octeontx2-pf: Fix missing spin_lock_init() in otx2_tc_add_flow()
PATCH 1/1 octeontx2-pf: Fix missing spin_lock_init() in otx2_tc_add_flow()
From: Wei Yongjun <[email protected]>
The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly.
Fixes d8ce30e0cf76 ("octeontx2-pf: add tc flower stats handler for hw offloads")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c +1 -0
@@ -536,6 +536,7 @@ static int otx2_tc_add_flow(struct otx2_nic *nic, new_node =kzalloc (sizeof (*new_node),GFP_KERNEL );if (!new_node)return -ENOMEM ; +spin_lock_init (&new_node->lock); new_node->cookie = tc_flow_cmd->cookie;mutex_lock (&nic->mbox.lock);
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Fri, 19 Mar 2021 09:41:03 +0000 you wrote:
From: Wei Yongjun <[email protected]>
The driver allocates the spinlock but not initialize it. Use
spin_lock_init()on it to initialize it correctly.Fixes d8ce30e0cf76 ("octeontx2-pf: add tc flower stats handler for hw offloads")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>[...]
Here is the summary with links:
- [net-next] octeontx2-pf: Fix missing spin_lock_init() in otx2_tc_add_flow()
https://git.kernel.org/netdev/net-next/c/140960564d63
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html