Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-12-03 09:47:54 +0100
committerPetr Tesarik <ptesarik@suse.cz>2019-12-03 09:54:34 +0100
commit4305857dc904361ed60b24b96b4983684df3a49f (patch)
tree57772a79de314e6c032b1c5900ac3df3ed332e05
parent3af13def0870b805709a791f4c6da9820cb76b8b (diff)
net/smc: fix ethernet interface refcounting (git-fixes).
-rw-r--r--patches.suse/net-smc-fix-ethernet-interface-refcounting35
-rw-r--r--series.conf1
2 files changed, 36 insertions, 0 deletions
diff --git a/patches.suse/net-smc-fix-ethernet-interface-refcounting b/patches.suse/net-smc-fix-ethernet-interface-refcounting
new file mode 100644
index 0000000000..240c2d3d13
--- /dev/null
+++ b/patches.suse/net-smc-fix-ethernet-interface-refcounting
@@ -0,0 +1,35 @@
+From: Ursula Braun <ubraun@linux.ibm.com>
+Date: Wed, 6 Nov 2019 10:49:57 +0100
+Subject: net/smc: fix ethernet interface refcounting
+Git-commit: 98f3375505b8d6517bd6710bc6d4f6289eeb30aa
+Patch-mainline: v5.4-rc7
+References: git-fixes
+
+If a pnet table entry is to be added mentioning a valid ethernet
+interface, but an invalid infiniband or ISM device, the dev_put()
+operation for the ethernet interface is called twice, resulting
+in a negative refcount for the ethernet interface, which disables
+removal of such a network interface.
+
+This patch removes one of the dev_put() calls.
+
+Fixes: 890a2cb4a966 ("net/smc: rework pnet table")
+Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
+Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Petr Tesarik <ptesarik@suse.com>
+---
+ net/smc/smc_pnet.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/net/smc/smc_pnet.c
++++ b/net/smc/smc_pnet.c
+@@ -375,8 +375,6 @@ static int smc_pnet_fill_entry(struct ne
+ return 0;
+
+ error:
+- if (pnetelem->ndev)
+- dev_put(pnetelem->ndev);
+ return rc;
+ }
+
diff --git a/series.conf b/series.conf
index 380753fafe..7ebb2a1cac 100644
--- a/series.conf
+++ b/series.conf
@@ -25676,6 +25676,7 @@
patches.suse/can-rx-offload-can_rx_offload_queue_tail-fix-error-h.patch
patches.suse/can-rx-offload-can_rx_offload_offload_one-do-not-inc.patch
patches.suse/powerpc-bpf-Fix-tail-call-implementation.patch
+ patches.suse/net-smc-fix-ethernet-interface-refcounting
patches.suse/nfc-netlink-fix-double-device-reference-drop.patch
patches.suse/watchdog-meson-Fix-the-wrong-value-of-left-time.patch
patches.suse/pinctrl-cherryview-Allocate-IRQ-chip-dynamic.patch