]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2019 08:13:17 +0000 (09:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2019 08:13:17 +0000 (09:13 +0100)
added patches:
revert-sock-reset-dst-when-changing-sk_mark-via-setsockopt.patch

queue-4.9/revert-sock-reset-dst-when-changing-sk_mark-via-setsockopt.patch [new file with mode: 0644]
queue-4.9/series [new file with mode: 0644]

diff --git a/queue-4.9/revert-sock-reset-dst-when-changing-sk_mark-via-setsockopt.patch b/queue-4.9/revert-sock-reset-dst-when-changing-sk_mark-via-setsockopt.patch
new file mode 100644 (file)
index 0000000..42ddc0b
--- /dev/null
@@ -0,0 +1,41 @@
+From 4cc0bf92ffc2b048c1e5c54eb451972b8219cc5f Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Fri, 29 Nov 2019 09:07:29 +0100
+Subject: Revert "sock: Reset dst when changing sk_mark via setsockopt"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit 597b389bd8d496c050b7a02058702d27bf0ae3fa which is
+commit 50254256f382c56bde87d970f3d0d02fdb76ec70 upstream.
+
+It breaks a number of runtime Android networking tests, so something is
+wrong with the backport, or something else also needed to be backported
+at the same time.  So I'm dropping this from the tree as regressions are
+not good.
+
+Cc: David Barmann <david.barmann@stackpath.com>
+Cc: Eric Dumazet <edumazet@google.com>
+Cc: David S. Miller <davem@davemloft.net>
+Cc: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/sock.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/net/core/sock.c
++++ b/net/core/sock.c
+@@ -945,12 +945,10 @@ set_rcvbuf:
+                       clear_bit(SOCK_PASSSEC, &sock->flags);
+               break;
+       case SO_MARK:
+-              if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) {
++              if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))
+                       ret = -EPERM;
+-              } else if (val != sk->sk_mark) {
++              else
+                       sk->sk_mark = val;
+-                      sk_dst_reset(sk);
+-              }
+               break;
+       case SO_RXQ_OVFL:
diff --git a/queue-4.9/series b/queue-4.9/series
new file mode 100644 (file)
index 0000000..2abfeb7
--- /dev/null
@@ -0,0 +1 @@
+revert-sock-reset-dst-when-changing-sk_mark-via-setsockopt.patch