mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
ipv6: Pass gfp_flags down to ip6_route_info_create_nh().
Since commit c4837b9853 ("ipv6: Split ip6_route_info_create()."),
ip6_route_info_create_nh() uses GFP_ATOMIC as it was expected to be
called under RCU.
Now, we can call it without RCU and use GFP_KERNEL.
Let's pass gfp_flags to ip6_route_info_create_nh().
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250516022759.44392-7-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
5e4a8cc7be
commit
d465bd07d1
|
|
@ -3834,6 +3834,7 @@ static struct fib6_info *ip6_route_info_create(struct fib6_config *cfg,
|
|||
|
||||
static int ip6_route_info_create_nh(struct fib6_info *rt,
|
||||
struct fib6_config *cfg,
|
||||
gfp_t gfp_flags,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct net *net = cfg->fc_nlinfo.nl_net;
|
||||
|
|
@ -3869,7 +3870,7 @@ static int ip6_route_info_create_nh(struct fib6_info *rt,
|
|||
} else {
|
||||
int addr_type;
|
||||
|
||||
err = fib6_nh_init(net, rt->fib6_nh, cfg, GFP_ATOMIC, extack);
|
||||
err = fib6_nh_init(net, rt->fib6_nh, cfg, gfp_flags, extack);
|
||||
if (err)
|
||||
goto out_release;
|
||||
|
||||
|
|
@ -3917,7 +3918,7 @@ int ip6_route_add(struct fib6_config *cfg, gfp_t gfp_flags,
|
|||
if (IS_ERR(rt))
|
||||
return PTR_ERR(rt);
|
||||
|
||||
err = ip6_route_info_create_nh(rt, cfg, extack);
|
||||
err = ip6_route_info_create_nh(rt, cfg, gfp_flags, extack);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
|
@ -4707,7 +4708,7 @@ struct fib6_info *addrconf_f6i_alloc(struct net *net,
|
|||
if (IS_ERR(f6i))
|
||||
return f6i;
|
||||
|
||||
err = ip6_route_info_create_nh(f6i, &cfg, extack);
|
||||
err = ip6_route_info_create_nh(f6i, &cfg, gfp_flags, extack);
|
||||
if (err)
|
||||
return ERR_PTR(err);
|
||||
|
||||
|
|
@ -5471,7 +5472,7 @@ static int ip6_route_multipath_add(struct fib6_config *cfg,
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
err = ip6_route_info_create_nh(rt, &r_cfg, extack);
|
||||
err = ip6_route_info_create_nh(rt, &r_cfg, GFP_KERNEL, extack);
|
||||
if (err) {
|
||||
rt = NULL;
|
||||
goto cleanup;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user