net/sched: act_mirred: Don't zero blockid when net device is being deleted
Subsystems (3)
PATCH v2 1/1 net/sched: act_mirred: Don't zero blockid when net device is being deleted
While testing tdc with parallel tests for mirred to block we caught an intermittent bug. The blockid was being zeroed out when a net device was deleted and, thus, giving us an incorrect blockid value whenever we tried to dump the mirred action. Since we don't increment the block refcount in the control path (and only use the ID), we don't need to zero the blockid field whenever a net device is going down.
---
v1 -> v2:
- Reword commit message to emphasise the bug is caused when a net device is being deleted
- Reword subject to emphasise the bug is caused when a net device is being deleted. Original patch subject was:
"net/sched: act_mirred: Don't zero blockid when netns is going down"
net/sched/act_mirred.c | 2 -- 1 file changed, 2 deletions(-)
net/sched/act_mirred.c +0 -2
@@ -533,8 +533,6 @@ static int mirred_device_event(struct notifier_block *unused,* net_device are already rcu protected. */ RCU_INIT_POINTER (m->tcfm_dev,NULL ); - }else if (m->tcfm_blockid) { - m->tcfm_blockid =0 ; }spin_unlock_bh (&m->tcf_lock); }
Signature · 1 line
2.34.1
Quoted 9 lines · Victor Nogueira
While testing tdc with parallel tests for mirred to block we caught an intermittent bug. The blockid was being zeroed out when a net device was deleted and, thus, giving us an incorrect blockid value whenever we tried to dump the mirred action. Since we don't increment the block refcount in the control path (and only use the ID), we don't need to zero the blockid field whenever a net device is going down.
Fixes 42f39036cda8 ("net/sched: act_mirred: Allow mirred to block")Signed-off-by Victor Nogueira <[email protected]>
Quoted 7 lines
---
v1 -> v2:
- Reword commit message to emphasise the bug is caused when a net device is being deleted
- Reword subject to emphasise the bug is caused when a net device is being deleted. Original patch subject was:
"net/sched:act_mirred: Don't zero blockid when netns is going down"
Thanks for the update.
Quoted 10 lines · Victor Nogueira
While testing tdc with parallel tests for mirred to block we caught an intermittent bug. The blockid was being zeroed out when a net device was deleted and, thus, giving us an incorrect blockid value whenever we tried to dump the mirred action. Since we don't increment the block refcount in the control path (and only use the ID), we don't need to zero the blockid field whenever a net device is going down.
Fixes 42f39036cda8 ("net/sched: act_mirred: Allow mirred to block")Signed-off-by Victor Nogueira <[email protected]>
Quoted 10 lines · Victor Nogueira
While testing tdc with parallel tests for mirred to block we caught an intermittent bug. The blockid was being zeroed out when a net device was deleted and, thus, giving us an incorrect blockid value whenever we tried to dump the mirred action. Since we don't increment the block refcount in the control path (and only use the ID), we don't need to zero the blockid field whenever a net device is going down.
Fixes 42f39036cda8 ("net/sched: act_mirred: Allow mirred to block")Signed-off-by Victor Nogueira <[email protected]>
cheers,
jamal
Quoted 27 lines
---
v1 -> v2:
- Reword commit message to emphasise the bug is caused when a net device is being deleted
- Reword subject to emphasise the bug is caused when a net device is being deleted. Original patch subject was:
"net/sched:act_mirred: Don't zero blockid when netns is going down"net/sched/act_mirred.c | 2 -- 1 file changed, 2 deletions(-)net/sched/act_mirred.c +0
-3@@ -533,8 +533,6 @@ static int mirred_device_event(struct notifier_block *unused,* net_device are already rcu protected. */ RCU_INIT_POINTER (m->tcfm_dev,NULL ); - }else if (m->tcfm_blockid) { - m->tcfm_blockid =0 ; }spin_unlock_bh (&m->tcf_lock); } --2.34.1
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 7 Feb 2024 19:29:02 -0300 you wrote:
While testing tdc with parallel tests for mirred to block we caught an intermittent bug. The blockid was being zeroed out when a net device was deleted and, thus, giving us an incorrect blockid value whenever we tried to dump the mirred action. Since we don't increment the block refcount in the control path (and only use the ID), we don't need to zero the blockid field whenever a net device is going down.
[...]
Here is the summary with links:
- [net,v2] net/sched: act_mirred: Don't zero blockid when net device is being deleted
https://git.kernel.org/netdev/net/c/aae09a6c7783
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html