diff options
| author | Xin Long <[email protected]> | 2023-06-12 15:55:34 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-06-15 05:34:13 +0000 |
| commit | 89da780aa4c7667c8b1a144959206262aebdeabe (patch) | |
| tree | ea242fe5a6946622ffeb6f8f44869de52c089afb /lib/test_vmalloc.c | |
| parent | rtnetlink: extend RTEXT_FILTER_SKIP_STATS to IFLA_VF_INFO (diff) | |
| download | kernel-89da780aa4c7667c8b1a144959206262aebdeabe.tar.gz kernel-89da780aa4c7667c8b1a144959206262aebdeabe.zip | |
rtnetlink: move validate_linkmsg out of do_setlink
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 <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/cf2ef061e08251faf9e8be25ff0d61150c030475.1686585334.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/test_vmalloc.c')
0 files changed, 0 insertions, 0 deletions
