This is a note to let you know that I've just added the patch titled s390/dasd: fix hanging DASD driver unbind to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: s390-dasd-fix-hanging-dasd-driver-unbind.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7d365bd0bff3c0310c39ebaffc9a8458e036d666 Mon Sep 17 00:00:00 2001 From: Stefan Haberland <sth@xxxxxxxxxxxxx> Date: Fri, 5 Mar 2021 13:54:38 +0100 Subject: s390/dasd: fix hanging DASD driver unbind From: Stefan Haberland <sth@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx Signed-off-by: Stefan Haberland <sth@xxxxxxxxxxxxx> Tested-by: Bjoern Walk <bwalk@xxxxxxxxxxxxx> Reviewed-by: Jan Hoeppner <hoeppner@xxxxxxxxxxxxx> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/s390/block/dasd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -3522,8 +3522,6 @@ void dasd_generic_remove(struct ccw_devi struct dasd_device *device; struct dasd_block *block; - cdev->handler = NULL; - device = dasd_device_from_cdev(cdev); if (IS_ERR(device)) { dasd_remove_sysfs_files(cdev); @@ -3542,6 +3540,7 @@ void dasd_generic_remove(struct ccw_devi * no quite down yet. */ dasd_set_target_state(device, DASD_STATE_NEW); + cdev->handler = NULL; /* dasd_delete_device destroys the device reference. */ block = device->block; dasd_delete_device(device); Patches currently in stable-queue which might be from sth@xxxxxxxxxxxxx are queue-5.4/s390-dasd-fix-hanging-dasd-driver-unbind.patch queue-5.4/s390-dasd-fix-hanging-io-request-during-dasd-driver-unbind.patch