]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
s390/dasd: fix hanging IO request during DASD driver unbind
authorStefan Haberland <sth@linux.ibm.com>
Fri, 5 Mar 2021 12:54:39 +0000 (13:54 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 17 Mar 2021 18:46:13 +0000 (13:46 -0500)
commitf074cd8db80e7c0facd026916e6e172d1b21ebc8
treec8a8f6ff47d87a06778502c7cd084f27e9a23c47
parent746556edd1f64317a39b0d1b4eedefe924584e6c
s390/dasd: fix hanging IO request during DASD driver unbind

BugLink: https://bugs.launchpad.net/bugs/1919492
commit 66f669a272898feb1c69b770e1504aa2ec7723d1 upstream.

Prevent that an IO request is build during device shutdown initiated by
a driver unbind. This request will never be able to be processed or
canceled and will hang forever. This will lead also to a hanging unbind.

Fix by checking not only if the device is in READY state but also check
that there is no device offline initiated before building a new IO request.

Fixes: e443343e509a ("s390/dasd: blk-mq conversion")
Cc: <stable@vger.kernel.org> # v4.14+
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