Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-29 09:07:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-29 09:31:24 +0100
commit2a1ddc6797b3f218cd8b35993eb82f956b300932 (patch)
tree33fbfde4870c63f9511c3d0487090d34ba279c84
parent95e55e41e655bff0de5abed850a951ff0631ea01 (diff)
Revert "sock: Reset dst when changing sk_mark via setsockopt"
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>
-rw-r--r--net/core/sock.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 9178c1654375..d22493351407 100644
--- 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: