From: Eric Dumazet Date: Tue, 3 Jan 2023 19:27:36 +0000 (+0000) Subject: inet: control sockets should not use current thread task_frag X-Git-Tag: v6.6.17~5811^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ac88557447088ccd15eb2f2520ce46d463c8e0b;p=platform%2Fkernel%2Flinux-rpi.git inet: control sockets should not use current thread task_frag Because ICMP handlers run from softirq contexts, they must not use current thread task_frag. Previously, all sockets allocated by inet_ctl_sock_create() would use the per-socket page fragment, with no chance of recursion. Fixes: 98123866fcf3 ("Treewide: Stop corrupting socket's task_frag") Reported-by: syzbot+bebc6f1acdf4cbb79b03@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Cc: Benjamin Coddington Acked-by: Guillaume Nault Link: https://lore.kernel.org/r/20230103192736.454149-1-edumazet@google.com Signed-off-by: Jakub Kicinski --- diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index ab4a06be..6c0ec27 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1665,6 +1665,7 @@ int inet_ctl_sock_create(struct sock **sk, unsigned short family, if (rc == 0) { *sk = sock->sk; (*sk)->sk_allocation = GFP_ATOMIC; + (*sk)->sk_use_task_frag = false; /* * Unhash it so that IP input processing does not even see it, * we do not wish this socket to see incoming packets.