Skip to content

Commit 1ac8855

Browse files
edumazetkuba-moo
authored andcommitted
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: 9812386 ("Treewide: Stop corrupting socket's task_frag") Reported-by: [email protected] Signed-off-by: Eric Dumazet <[email protected]> Cc: Benjamin Coddington <[email protected]> Acked-by: Guillaume Nault <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2c02d41 commit 1ac8855

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/ipv4/af_inet.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,7 @@ int inet_ctl_sock_create(struct sock **sk, unsigned short family,
16651665
if (rc == 0) {
16661666
*sk = sock->sk;
16671667
(*sk)->sk_allocation = GFP_ATOMIC;
1668+
(*sk)->sk_use_task_frag = false;
16681669
/*
16691670
* Unhash it so that IP input processing does not even see it,
16701671
* we do not wish this socket to see incoming packets.

0 commit comments

Comments
 (0)