From: Stefan Richter Date: Sun, 6 Sep 2009 16:50:29 +0000 (+0200) Subject: firewire: core: fix race with parallel PCI device probe X-Git-Tag: v2.6.32-rc1~169^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b171e204b32b69e241af994d6e9be559e33535c1;p=pandora-kernel.git firewire: core: fix race with parallel PCI device probe The config ROM buffer received from generate_config_rom is a globally shared static buffer. Extend the card_mutex protection in fw_add_card until after the config ROM was copied into the card driver's buffer. Otherwise, parallelized card driver probes may end up with ROM contents that were meant for a different card. firewire-ohci's card->driver->enable hook is safe to be called within the card_mutex. Furthermore, it is safe to reorder card_list update versus card enable, which simplifies the code a little. Signed-off-by: Stefan Richter --- Reading git-diff-tree failed