[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJWXUQ3iVkePuBuQtW6CnTZXiskX+GS4ziXeO_AuzMCsw@mail.gmail.com>
Date: Fri, 7 Feb 2025 09:27:47 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Ido Schimmel <idosch@...sch.org>,
Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next 1/8] net: fib_rules: Don't check net in
rule_exists() and rule_find().
On Fri, Feb 7, 2025 at 8:25 AM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> fib_nl_newrule() / fib_nl_delrule() looks up struct fib_rules_ops
> in sock_net(skb->sk) and calls rule_exists() / rule_find() respectively.
>
> fib_nl_newrule() creates a new rule and links it to the found ops, so
> struct fib_rule never belongs to a different netns's ops->rules_list.
>
> Let's remove redundant netns check in rule_exists() and rule_find().
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists