diff options
author | B.J. Buchalter <bj@mhlabs.com> | 2011-05-02 13:33:42 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-02 22:55:22 +0200 |
commit | 2e053a27d9d5ad5e0831e002cbf8043836fb2060 (patch) | |
tree | 4e3ed1110128cbb1ba3b5baf4e45161300ad58c2 /arch/x86/math-emu | |
parent | 115881d395959b75c8c3bb94913f2ce869b8aa7a (diff) | |
download | kernel_samsung_tuna-2e053a27d9d5ad5e0831e002cbf8043836fb2060.zip kernel_samsung_tuna-2e053a27d9d5ad5e0831e002cbf8043836fb2060.tar.gz kernel_samsung_tuna-2e053a27d9d5ad5e0831e002cbf8043836fb2060.tar.bz2 |
firewire: Fix for broken configrom updates in quick succession
Current implementation of ohci_set_config_rom() uses a deferred
bus reset via fw_schedule_bus_reset(). If clients add multiple
unit descriptors to the config_rom in quick succession, the
deferred bus reset may not have fired before succeeding update
requests have come in. This can lead to an incorrect partial
update of the config_rom for both addition and removal of
config_rom descriptors, as the ohci_set_config_rom() routine
will return -EBUSY if a previous pending update has not been
completed yet; the requested update just gets dropped on the floor.
This patch recognizes that the "in-flight" update can be modified
until it has been processed by the bus-reset, and the locking
in the bus_reset_tasklet ensures that the update is done atomically
with respect to modifications made by ohci_set_config_rom(). The
-EBUSY error case is simply removed.
[Stefan R: The bug always existed at least theoretically. But it
became easy to trigger since 2.6.36 commit 02d37bed188c "firewire: core:
integrate software-forced bus resets with bus management" which
introduced long mandatory delays between janitorial bus resets.]
Signed-off-by: Benjamin Buchalter <bj@mhlabs.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (trivial style changes)
Cc: <stable@kernel.org> # 2.6.36.y and newer
Diffstat (limited to 'arch/x86/math-emu')
0 files changed, 0 insertions, 0 deletions