]> git.itanic.dy.fi Git - linux-stable/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)
commit7d365bd0bff3c0310c39ebaffc9a8458e036d666
tree97bd3c6dbeb33565c6f0f4455456c7492cbcdac4
parent56887cffe946bb0a90c74429fa94d6110a73119d
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