From: Jörn Engel Date: Thu, 12 Apr 2012 21:33:58 +0000 (-0400) Subject: [SCSI] sg: prevent unwoken sleep X-Git-Tag: v3.5-rc1~172^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6acddc5e911bb3a4a007448371ed7317c85669da;p=pandora-kernel.git [SCSI] sg: prevent unwoken sleep srp->done is protected by sfp->rq_list_lock everywhere, except for this one case. Result can be that the wake-up happens before the cacheline with the changed srp->done has arrived, so the waiter can go back to sleep and never be woken up again. The wait_event_interruptible() means that anyone trying to debug this unlikely race will likely notice everything working fine again, as the next signal will unwedge things. Evil. Signed-off-by: Joern Engel Acked-by: Douglas Gilbert Signed-off-by: James Bottomley --- Reading git-diff-tree failed