Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net] net/prestera: Fix devlink groups leakage in error flow
@ 2021-08-03 12:00 Leon Romanovsky
  2021-08-04  9:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Leon Romanovsky @ 2021-08-03 12:00 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: Leon Romanovsky, netdev, Oleksandr Mazur, Taras Chornyi, Vadym Kochan

From: Leon Romanovsky <leonro@nvidia.com>

Devlink trap group is registered but not released in error flow,
add the missing devlink_trap_groups_unregister() call.

Fixes: 0a9003f45e91 ("net: marvell: prestera: devlink: add traps/groups implementation")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/net/ethernet/marvell/prestera/prestera_devlink.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_devlink.c b/drivers/net/ethernet/marvell/prestera/prestera_devlink.c
index d12e21db9fd6..fa7a0682ad1e 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_devlink.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_devlink.c
@@ -530,6 +530,8 @@ static int prestera_devlink_traps_register(struct prestera_switch *sw)
 		prestera_trap = &prestera_trap_items_arr[i];
 		devlink_traps_unregister(devlink, &prestera_trap->trap, 1);
 	}
+	devlink_trap_groups_unregister(devlink, prestera_trap_groups_arr,
+				       groups_count);
 err_groups_register:
 	kfree(trap_data->trap_items_arr);
 err_trap_items_alloc:
-- 
2.31.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net/prestera: Fix devlink groups leakage in error flow
  2021-08-03 12:00 [PATCH net] net/prestera: Fix devlink groups leakage in error flow Leon Romanovsky
@ 2021-08-04  9:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-04  9:10 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: davem, kuba, leonro, netdev, oleksandr.mazur, tchornyi, vkochan

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue,  3 Aug 2021 15:00:43 +0300 you wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> Devlink trap group is registered but not released in error flow,
> add the missing devlink_trap_groups_unregister() call.
> 
> Fixes: 0a9003f45e91 ("net: marvell: prestera: devlink: add traps/groups implementation")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net] net/prestera: Fix devlink groups leakage in error flow
    https://git.kernel.org/netdev/net/c/13a9c4ac319a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-04  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 12:00 [PATCH net] net/prestera: Fix devlink groups leakage in error flow Leon Romanovsky
2021-08-04  9:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).