]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] atari_scsi: Fix sleep_on race
authorArnd Bergmann <arnd@arndb.de>
Sat, 1 Mar 2014 07:51:03 +0000 (20:51 +1300)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 10 Mar 2014 20:15:09 +0000 (21:15 +0100)
commit4c5d8d8944a0b417151c2ca925e94607eed0e188
tree00dae389bf92fee740031bc618754eeb3c68f5bd
parent09bfcc9598f471eb709c38ba1db2016953782e4b
[SCSI] atari_scsi: Fix sleep_on race

sleep_on is known broken and going away. The atari_scsi driver is one of
two remaining users in the falcon_get_lock() function, which is a rather
crazy piece of code. This does not attempt to fix the driver's locking
scheme in general, but at least prevents falcon_get_lock from going to
sleep when no other thread holds the same lock or tries to get it,
and we no longer schedule with irqs disabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[MSch: fixed completion conditions missed in Arnds' original RFC patch]
Signed-off-by: Michael Schmitz <schmitz@debian.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: James E.J. Bottomley <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
drivers/scsi/atari_scsi.c