Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-03-22 10:39:25 +0100
committerPetr Tesarik <ptesarik@suse.cz>2019-04-04 13:29:03 +0200
commitae5cd8e277abdf9b46c136219719dc62486b28f4 (patch)
tree9c051dfc5d6d53cdf2b42f0925a7e046f98ffe52
parent71694616f926f7b1da835856a996e56a67086766 (diff)
net/smc: check connections in smc_lgr_free_work (bsc#1129861
LTC#176250).
-rw-r--r--patches.fixes/net-smc-check-connections-in-smc_lgr_free_work43
-rw-r--r--series.conf1
2 files changed, 44 insertions, 0 deletions
diff --git a/patches.fixes/net-smc-check-connections-in-smc_lgr_free_work b/patches.fixes/net-smc-check-connections-in-smc_lgr_free_work
new file mode 100644
index 0000000000..2264f85bf7
--- /dev/null
+++ b/patches.fixes/net-smc-check-connections-in-smc_lgr_free_work
@@ -0,0 +1,43 @@
+From: Karsten Graul <kgraul@linux.ibm.com>
+Date: Tue, 12 Feb 2019 16:29:54 +0100
+Subject: net/smc: check connections in smc_lgr_free_work
+Git-commit: e78b2622266ce962b18efad8f29acdc6052db010
+Patch-mainline: v5.1-rc1
+References: bsc#1129861 LTC#176250
+
+Remove the shortcut that smc_lgr_free() would skip the check for
+existing connections when the link group is not in the link group list.
+
+Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
+Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Petr Tesarik <ptesarik@suse.com>
+---
+ net/smc/smc_core.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
+index 349d789a9728..53a17cfa61af 100644
+--- a/net/smc/smc_core.c
++++ b/net/smc/smc_core.c
+@@ -160,8 +160,6 @@ static void smc_lgr_free_work(struct work_struct *work)
+ bool conns;
+
+ spin_lock_bh(&smc_lgr_list.lock);
+- if (list_empty(&lgr->list))
+- goto free;
+ read_lock_bh(&lgr->conns_lock);
+ conns = RB_EMPTY_ROOT(&lgr->conns_all);
+ read_unlock_bh(&lgr->conns_lock);
+@@ -169,8 +167,8 @@ static void smc_lgr_free_work(struct work_struct *work)
+ spin_unlock_bh(&smc_lgr_list.lock);
+ return;
+ }
+- list_del_init(&lgr->list); /* remove from smc_lgr_list */
+-free:
++ if (!list_empty(&lgr->list))
++ list_del_init(&lgr->list); /* remove from smc_lgr_list */
+ spin_unlock_bh(&smc_lgr_list.lock);
+
+ if (!lgr->is_smcd && !lgr->terminating) {
+
diff --git a/series.conf b/series.conf
index ce9b8f3c8d..17852b11d3 100644
--- a/series.conf
+++ b/series.conf
@@ -44436,6 +44436,7 @@
patches.fixes/net-smc-move-wake-up-of-close-waiter
patches.fixes/net-smc-no-delay-for-free-tx-buffer-wait
patches.fixes/net-smc-reduce-amount-of-status-updates-to-peer
+ patches.fixes/net-smc-check-connections-in-smc_lgr_free_work
patches.drivers/devlink-Return-right-error-code-in-case-of-errors-fo.patch
patches.drivers/devlink-Fix-list-access-without-lock-while-reading-r.patch
patches.drivers/cxgb4-cxgb4vf-Add-support-for-SGE-doorbell-queue-tim.patch