]> git.ipfire.org Git - thirdparty/linux.git/commit
ipv6: Preallocate nhc_pcpu_rth_output in ip6_route_info_create().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 18 Apr 2025 00:03:49 +0000 (17:03 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 24 Apr 2025 07:29:56 +0000 (09:29 +0200)
commitd27b9c40dbd66aa78b3e6657e600cf057a48ac1e
tree1423150bc6b5f6f2cd39649e8550928320c3ce55
parent5720a328c3e9802af48dd216c1c7eb0e91b61b6c
ipv6: Preallocate nhc_pcpu_rth_output in ip6_route_info_create().

ip6_route_info_create_nh() will be called under RCU.

It calls fib_nh_common_init() and allocates nhc->nhc_pcpu_rth_output.

As with the reason for rt->fib6_nh->rt6i_pcpu, we want to avoid
GFP_ATOMIC allocation for nhc->nhc_pcpu_rth_output under RCU.

Let's preallocate it in ip6_route_info_create().

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250418000443.43734-9-kuniyu@amazon.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv4/fib_semantics.c
net/ipv6/route.c