diff options
author | Eric Dumazet <edumazet@google.com> | 2021-12-05 11:28:22 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-06 16:56:32 -0800 |
commit | 4dbb0dad8e63fcd0b5a117c2861d2abe7ff5f186 (patch) | |
tree | 59be9e2128d788c38e5188e0d9a5a076ed0ed2c0 /drivers/net | |
parent | dde91ccfa25fd58f64c397d91b81a4b393100ffa (diff) |
devlink: fix netns refcount leak in devlink_nl_cmd_reload()
While preparing my patch series adding netns refcount tracking,
I spotted bugs in devlink_nl_cmd_reload()
Some error paths forgot to release a refcount on a netns.
To fix this, we can reduce the scope of get_net()/put_net()
section around the call to devlink_reload().
Fixes: ccdf07219da6 ("devlink: Add reload action option to devlink reload command")
Fixes: dc64cc7c6310 ("devlink: Add devlink reload limit option")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Moshe Shemesh <moshe@mellanox.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>
Cc: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20211205192822.1741045-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
0 files changed, 0 insertions, 0 deletions