]> git.baikalelectronics.ru Git - kernel.git/commit
s390/dasd: fix hanging DASD driver unbind
authorStefan Haberland <sth@linux.ibm.com>
Fri, 5 Mar 2021 12:54:38 +0000 (13:54 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Mar 2021 18:30:17 +0000 (11:30 -0700)
commit739c6035d62d0c7174f08bae799173ac592e1520
tree97bd3c6dbeb33565c6f0f4455456c7492cbcdac4
parent8bc6caf20a28f58f3d1f00c46bbcbec3660c9f4c
s390/dasd: fix hanging DASD driver unbind

In case of an unbind of the DASD device driver the function
dasd_generic_remove() is called which shuts down the device.
Among others this functions removes the int_handler from the cdev.
During shutdown the device cancels all outstanding IO requests and waits
for completion of the clear request.
Unfortunately the clear interrupt will never be received when there is no
interrupt handler connected.

Fix by moving the int_handler removal after the call to the state machine
where no request or interrupt is outstanding.

Cc: stable@vger.kernel.org
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Tested-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/s390/block/dasd.c