From: Simon Horman <simon.horman@corigine.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
davem@davemloft.net, kuba@kernel.org,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next] rtnetlink: move validate_linkmsg out of do_setlink
Date: Wed, 14 Jun 2023 13:49:13 +0200 [thread overview]
Message-ID: <ZImpOXa8A/q8eUby@corigine.com> (raw)
In-Reply-To: <cf2ef061e08251faf9e8be25ff0d61150c030475.1686585334.git.lucien.xin@gmail.com>
On Mon, Jun 12, 2023 at 11:55:34AM -0400, Xin Long wrote:
> This patch moves validate_linkmsg() out of do_setlink() to its callers
> and deletes the early validate_linkmsg() call in __rtnl_newlink(), so
> that it will not call validate_linkmsg() twice in either of the paths:
>
> - __rtnl_newlink() -> do_setlink()
> - __rtnl_newlink() -> rtnl_newlink_create() -> rtnl_create_link()
>
> Additionally, as validate_linkmsg() is now only called with a real
> dev, we can remove the NULL check for dev in validate_linkmsg().
>
> Note that we moved validate_linkmsg() check to the places where it has
> not done any changes to the dev, as Jakub suggested.
>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
next prev parent reply other threads:[~2023-06-14 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 15:55 [PATCH net-next] rtnetlink: move validate_linkmsg out of do_setlink Xin Long
2023-06-14 11:49 ` Simon Horman [this message]
2023-06-15 5:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZImpOXa8A/q8eUby@corigine.com \
--to=simon.horman@corigine.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.