Skip to content
Commit b171e204 authored by Stefan Richter's avatar Stefan Richter
Browse files

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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 18668ff9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment