diff options
author | Alexandra Winter <wintera@linux.ibm.com> | 2021-09-21 16:52:17 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-09-22 05:02:24 +0200 |
commit | d2b59bd4b06d84a4eadb520b0f71c62fe8ec0a62 (patch) | |
tree | 7e5fe772eed361a7afc9e9f0accc14e1e8a05841 /drivers/s390/net | |
parent | s390/qeth: Fix deadlock in remove_discipline (diff) | |
download | linux-d2b59bd4b06d84a4eadb520b0f71c62fe8ec0a62.tar.xz linux-d2b59bd4b06d84a4eadb520b0f71c62fe8ec0a62.zip |
s390/qeth: fix deadlock during failing recovery
Commit 0b9902c1fcc5 ("s390/qeth: fix deadlock during recovery") removed
taking discipline_mutex inside qeth_do_reset(), fixing potential
deadlocks. An error path was missed though, that still takes
discipline_mutex and thus has the original deadlock potential.
Intermittent deadlocks were seen when a qeth channel path is configured
offline, causing a race between qeth_do_reset and ccwgroup_remove.
Call qeth_set_offline() directly in the qeth_do_reset() error case and
then a new variant of ccwgroup_set_offline(), without taking
discipline_mutex.
Fixes: b41b554c1ee7 ("s390/qeth: fix locking for discipline setup / removal")
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/s390/net')
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 9f26706051e5..e9807d2996a9 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -5514,7 +5514,8 @@ static int qeth_do_reset(void *data) dev_info(&card->gdev->dev, "Device successfully recovered!\n"); } else { - ccwgroup_set_offline(card->gdev); + qeth_set_offline(card, disc, true); + ccwgroup_set_offline(card->gdev, false); dev_warn(&card->gdev->dev, "The qeth device driver failed to recover an error on the device\n"); } |