]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 17 Mar 2021 18:46:13 +0000 (13:46 -0500)
commit746556edd1f64317a39b0d1b4eedefe924584e6c
tree7e637186f2498601a87c1a62ae90484f31cb832b
parentee7f6ffecdf233281d7ef14120dc38bdf68aef48
s390/dasd: fix hanging DASD driver unbind

BugLink: https://bugs.launchpad.net/bugs/1919492
commit 7d365bd0bff3c0310c39ebaffc9a8458e036d666 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/s390/block/dasd.c