]> bbs.cooldavid.org Git - net-next-2.6.git/commit
[S390] cio: call ccw driver notify function with lock held
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Thu, 21 Aug 2008 17:46:39 +0000 (19:46 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 21 Aug 2008 17:46:41 +0000 (19:46 +0200)
commit91c36919a456589f4f073671474a1f899e0d3c2b
tree63cb2ee1afd9b00bf2ea4959482d58f402bb21f3
parent49fd38bdaa96f093fcad3176a781a4d0de8f8602
[S390] cio: call ccw driver notify function with lock held

Calling a ccw driver's notify function without the ccw device lock
held opens up a race window between discovery and handling of a change
in the device operational state. As a result, the device driver may
encounter unexpected device malfunction, leading to out-of-retry
situations or similar.

Remove race by extending the ccw device lock from state change
discovery to the calling of the notify function.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd.c
drivers/s390/cio/css.c
drivers/s390/cio/device.c
drivers/s390/cio/device.h
drivers/s390/cio/device_fsm.c