[S390] dasd: fix locking in __dasd_device_process_final_queue
authorStefan Weinhuber <wein@de.ibm.com>
Tue, 19 Feb 2008 14:29:27 +0000 (15:29 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 19 Feb 2008 14:29:33 +0000 (15:29 +0100)
commit03513bccad33667ed738cfd96dc5757e539e0bdb
treefd6d91ac38deb371bb29b567894056a8c8f9e4e0
parent11ab244c9faead91683a12e4cb10d26b279bb4aa
[S390] dasd: fix locking in __dasd_device_process_final_queue

After setting the status of the cqr and releasing the lock for the
block cqr queue, we call the cqr callback function, which will usually
just trigger the dasd_block_tasklet. But when the tasklet is already
running the cqr might be processed before we invoke the callback
function. In rare cases the callback pointer may already be invalid
by the time we want to call it, which will result in a panic.
Solution: Call the callback function first and then release the lock.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd.c