]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2024 09:24:07 +0000 (11:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2024 09:24:07 +0000 (11:24 +0200)
added patches:
cx82310_eth-fix-error-return-code-in-cx82310_bind.patch
net-bridge-explicitly-zero-is_sticky-in-fdb_create.patch
netns-restore-ops-before-calling-ops_exit_list.patch

queue-4.19/cx82310_eth-fix-error-return-code-in-cx82310_bind.patch [new file with mode: 0644]
queue-4.19/net-bridge-explicitly-zero-is_sticky-in-fdb_create.patch [new file with mode: 0644]
queue-4.19/netns-restore-ops-before-calling-ops_exit_list.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/cx82310_eth-fix-error-return-code-in-cx82310_bind.patch b/queue-4.19/cx82310_eth-fix-error-return-code-in-cx82310_bind.patch
new file mode 100644 (file)
index 0000000..408e71e
--- /dev/null
@@ -0,0 +1,34 @@
+From cfbaa8b33e022aca62a3f2815ffbc02874d4cb8b Mon Sep 17 00:00:00 2001
+From: Zhang Changzhong <zhangchangzhong@huawei.com>
+Date: Fri, 13 Nov 2020 14:07:07 +0800
+Subject: cx82310_eth: fix error return code in cx82310_bind()
+
+From: Zhang Changzhong <zhangchangzhong@huawei.com>
+
+commit cfbaa8b33e022aca62a3f2815ffbc02874d4cb8b upstream.
+
+Fix to return a negative error code from the error handling
+case instead of 0, as done elsewhere in this function.
+
+Fixes: ca139d76b0d9 ("cx82310_eth: re-enable ethernet mode after router reboot")
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
+Link: https://lore.kernel.org/r/1605247627-15385-1-git-send-email-zhangchangzhong@huawei.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/usb/cx82310_eth.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/usb/cx82310_eth.c
++++ b/drivers/net/usb/cx82310_eth.c
+@@ -213,7 +213,8 @@ static int cx82310_bind(struct usbnet *d
+       }
+       /* enable ethernet mode (?) */
+-      if (cx82310_enable_ethernet(dev))
++      ret = cx82310_enable_ethernet(dev);
++      if (ret)
+               goto err;
+       /* get the MAC address */
diff --git a/queue-4.19/net-bridge-explicitly-zero-is_sticky-in-fdb_create.patch b/queue-4.19/net-bridge-explicitly-zero-is_sticky-in-fdb_create.patch
new file mode 100644 (file)
index 0000000..1f7f4b4
--- /dev/null
@@ -0,0 +1,30 @@
+From 1288aa7af20cfa25cb00cf0d77f94d1891644c83 Mon Sep 17 00:00:00 2001
+From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
+Date: Thu, 27 Sep 2018 15:05:10 +0300
+Subject: net: bridge: explicitly zero is_sticky in fdb_create
+
+From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
+
+commit 1288aa7af20cfa25cb00cf0d77f94d1891644c83 upstream.
+
+We need to explicitly zero is_sticky when creating a new fdb, otherwise
+we might get a stale value for a new entry.
+
+Fixes: 435f2e7cc0b7 ("net: bridge: add support for sticky fdb entries")
+Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bridge/br_fdb.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/net/bridge/br_fdb.c
++++ b/net/bridge/br_fdb.c
+@@ -512,6 +512,7 @@ static struct net_bridge_fdb_entry *fdb_
+               if (is_static)
+                       set_bit(BR_FDB_STATIC, &fdb->flags);
+               fdb->offloaded = 0;
++              fdb->is_sticky = 0;
+               fdb->updated = fdb->used = jiffies;
+               if (rhashtable_lookup_insert_fast(&br->fdb_hash_tbl,
+                                                 &fdb->rhnode,
diff --git a/queue-4.19/netns-restore-ops-before-calling-ops_exit_list.patch b/queue-4.19/netns-restore-ops-before-calling-ops_exit_list.patch
new file mode 100644 (file)
index 0000000..93006c3
--- /dev/null
@@ -0,0 +1,32 @@
+From b272a0ad730103e84fb735fd0a8cc050cdf7f77c Mon Sep 17 00:00:00 2001
+From: Li RongQing <lirongqing@baidu.com>
+Date: Thu, 20 Jun 2019 19:24:40 +0800
+Subject: netns: restore ops before calling ops_exit_list
+
+From: Li RongQing <lirongqing@baidu.com>
+
+commit b272a0ad730103e84fb735fd0a8cc050cdf7f77c upstream.
+
+ops has been iterated to first element when call pre_exit, and
+it needs to restore from save_ops, not save ops to save_ops
+
+Fixes: d7d99872c144 ("netns: add pre_exit method to struct pernet_operations")
+Signed-off-by: Li RongQing <lirongqing@baidu.com>
+Reviewed-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/net_namespace.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/core/net_namespace.c
++++ b/net/core/net_namespace.c
+@@ -357,7 +357,7 @@ out_undo:
+       synchronize_rcu();
+-      saved_ops = ops;
++      ops = saved_ops;
+       list_for_each_entry_continue_reverse(ops, &pernet_list, list)
+               ops_exit_list(ops, &net_exit_list);
index 882a66800a635d3f51fedff2dd4b4db9a451722b..eebc5ca96685bbf0b45c5ace9ca5120dde0493a5 100644 (file)
@@ -91,3 +91,6 @@ drm-i915-fence-mark-debug_fence_init_onstack-with-__.patch
 drm-i915-fence-mark-debug_fence_free-with-__maybe_un.patch
 rtmutex-drop-rt_mutex-wait_lock-before-scheduling.patch
 net-sunrpc-remap-eperm-in-case-of-connection-failure-in-xs_tcp_setup_socket.patch
+cx82310_eth-fix-error-return-code-in-cx82310_bind.patch
+net-bridge-explicitly-zero-is_sticky-in-fdb_create.patch
+netns-restore-ops-before-calling-ops_exit_list.patch