+++ /dev/null
-From 840557f46ba3f39a0989d53ab62ad226dec63e7f Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 21 Sep 2021 16:52:17 +0200
-Subject: s390/qeth: fix deadlock during failing recovery
-
-From: Alexandra Winter <wintera@linux.ibm.com>
-
-[ Upstream commit d2b59bd4b06d84a4eadb520b0f71c62fe8ec0a62 ]
-
-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>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/s390/include/asm/ccwgroup.h | 2 +-
- drivers/s390/cio/ccwgroup.c | 10 ++++++++--
- drivers/s390/net/qeth_core_main.c | 3 ++-
- 3 files changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/arch/s390/include/asm/ccwgroup.h b/arch/s390/include/asm/ccwgroup.h
-index ad3acb1e882b..8a22da9a735a 100644
---- a/arch/s390/include/asm/ccwgroup.h
-+++ b/arch/s390/include/asm/ccwgroup.h
-@@ -58,7 +58,7 @@ struct ccwgroup_device *get_ccwgroupdev_by_busid(struct ccwgroup_driver *gdrv,
- char *bus_id);
-
- extern int ccwgroup_set_online(struct ccwgroup_device *gdev);
--extern int ccwgroup_set_offline(struct ccwgroup_device *gdev);
-+int ccwgroup_set_offline(struct ccwgroup_device *gdev, bool call_gdrv);
-
- extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev);
- extern void ccwgroup_remove_ccwdev(struct ccw_device *cdev);
-diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
-index 483a9ecfcbb1..cfdc1c7825d0 100644
---- a/drivers/s390/cio/ccwgroup.c
-+++ b/drivers/s390/cio/ccwgroup.c
-@@ -98,12 +98,13 @@ EXPORT_SYMBOL(ccwgroup_set_online);
- /**
- * ccwgroup_set_offline() - disable a ccwgroup device
- * @gdev: target ccwgroup device
-+ * @call_gdrv: Call the registered gdrv set_offline function
- *
- * This function attempts to put the ccwgroup device into the offline state.
- * Returns:
- * %0 on success and a negative error value on failure.
- */
--int ccwgroup_set_offline(struct ccwgroup_device *gdev)
-+int ccwgroup_set_offline(struct ccwgroup_device *gdev, bool call_gdrv)
- {
- struct ccwgroup_driver *gdrv = to_ccwgroupdrv(gdev->dev.driver);
- int ret = -EINVAL;
-@@ -112,11 +113,16 @@ int ccwgroup_set_offline(struct ccwgroup_device *gdev)
- return -EAGAIN;
- if (gdev->state == CCWGROUP_OFFLINE)
- goto out;
-+ if (!call_gdrv) {
-+ ret = 0;
-+ goto offline;
-+ }
- if (gdrv->set_offline)
- ret = gdrv->set_offline(gdev);
- if (ret)
- goto out;
-
-+offline:
- gdev->state = CCWGROUP_OFFLINE;
- out:
- atomic_set(&gdev->onoff, 0);
-@@ -145,7 +151,7 @@ static ssize_t ccwgroup_online_store(struct device *dev,
- if (value == 1)
- ret = ccwgroup_set_online(gdev);
- else if (value == 0)
-- ret = ccwgroup_set_offline(gdev);
-+ ret = ccwgroup_set_offline(gdev, true);
- else
- ret = -EINVAL;
- out:
-diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
-index 7b0155b0e99e..15477bfb5bd8 100644
---- a/drivers/s390/net/qeth_core_main.c
-+++ b/drivers/s390/net/qeth_core_main.c
-@@ -5406,7 +5406,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");
- }
---
-2.33.0
-
kselftest-arm64-signal-add-sve-to-the-set-of-feature.patch
kselftest-arm64-signal-skip-tests-if-required-featur.patch
s390-qeth-fix-null-deref-in-qeth_clear_working_pool_.patch
-s390-qeth-fix-deadlock-during-failing-recovery.patch
gpio-uniphier-fix-void-functions-to-remove-return-va.patch
qed-rdma-don-t-wait-for-resources-under-hw-error-rec.patch
net-mlx4_en-don-t-allow-arfs-for-encapsulated-packet.patch
+++ /dev/null
-From 44f2950e4583910b42bbd6534292658832d84a39 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 21 Sep 2021 16:52:17 +0200
-Subject: s390/qeth: fix deadlock during failing recovery
-
-From: Alexandra Winter <wintera@linux.ibm.com>
-
-[ Upstream commit d2b59bd4b06d84a4eadb520b0f71c62fe8ec0a62 ]
-
-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>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/s390/include/asm/ccwgroup.h | 2 +-
- drivers/s390/cio/ccwgroup.c | 10 ++++++++--
- drivers/s390/net/qeth_core_main.c | 3 ++-
- 3 files changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/arch/s390/include/asm/ccwgroup.h b/arch/s390/include/asm/ccwgroup.h
-index 20f169b6db4e..d97301d9d0b8 100644
---- a/arch/s390/include/asm/ccwgroup.h
-+++ b/arch/s390/include/asm/ccwgroup.h
-@@ -57,7 +57,7 @@ struct ccwgroup_device *get_ccwgroupdev_by_busid(struct ccwgroup_driver *gdrv,
- char *bus_id);
-
- extern int ccwgroup_set_online(struct ccwgroup_device *gdev);
--extern int ccwgroup_set_offline(struct ccwgroup_device *gdev);
-+int ccwgroup_set_offline(struct ccwgroup_device *gdev, bool call_gdrv);
-
- extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev);
- extern void ccwgroup_remove_ccwdev(struct ccw_device *cdev);
-diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
-index 9748165e08e9..f19f02e75115 100644
---- a/drivers/s390/cio/ccwgroup.c
-+++ b/drivers/s390/cio/ccwgroup.c
-@@ -77,12 +77,13 @@ EXPORT_SYMBOL(ccwgroup_set_online);
- /**
- * ccwgroup_set_offline() - disable a ccwgroup device
- * @gdev: target ccwgroup device
-+ * @call_gdrv: Call the registered gdrv set_offline function
- *
- * This function attempts to put the ccwgroup device into the offline state.
- * Returns:
- * %0 on success and a negative error value on failure.
- */
--int ccwgroup_set_offline(struct ccwgroup_device *gdev)
-+int ccwgroup_set_offline(struct ccwgroup_device *gdev, bool call_gdrv)
- {
- struct ccwgroup_driver *gdrv = to_ccwgroupdrv(gdev->dev.driver);
- int ret = -EINVAL;
-@@ -91,11 +92,16 @@ int ccwgroup_set_offline(struct ccwgroup_device *gdev)
- return -EAGAIN;
- if (gdev->state == CCWGROUP_OFFLINE)
- goto out;
-+ if (!call_gdrv) {
-+ ret = 0;
-+ goto offline;
-+ }
- if (gdrv->set_offline)
- ret = gdrv->set_offline(gdev);
- if (ret)
- goto out;
-
-+offline:
- gdev->state = CCWGROUP_OFFLINE;
- out:
- atomic_set(&gdev->onoff, 0);
-@@ -124,7 +130,7 @@ static ssize_t ccwgroup_online_store(struct device *dev,
- if (value == 1)
- ret = ccwgroup_set_online(gdev);
- else if (value == 0)
-- ret = ccwgroup_set_offline(gdev);
-+ ret = ccwgroup_set_offline(gdev, true);
- else
- ret = -EINVAL;
- out:
-diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
-index 51f7f4e680c3..52dabdb32efb 100644
---- a/drivers/s390/net/qeth_core_main.c
-+++ b/drivers/s390/net/qeth_core_main.c
-@@ -5556,7 +5556,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");
- }
---
-2.33.0
-
kselftest-arm64-signal-skip-tests-if-required-featur.patch
spi-revert-modalias-changes.patch
s390-qeth-fix-null-deref-in-qeth_clear_working_pool_.patch
-s390-qeth-fix-deadlock-during-failing-recovery.patch
gpiolib-acpi-make-set-debounce-timeout-failures-non-.patch
gpio-uniphier-fix-void-functions-to-remove-return-va.patch
qed-rdma-don-t-wait-for-resources-under-hw-error-rec.patch