net/sched: act_mirred: Don't zero blockid when net device is being deleted
authorVictor Nogueira <victor@mojatatu.com>
Wed, 7 Feb 2024 22:29:02 +0000 (19:29 -0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Feb 2024 20:57:25 +0000 (12:57 -0800)
commitaae09a6c7783e28d1bcafee85e172fe411923b22
tree6f5f4b177f1489774db9741a668a67a9d14238e8
parent6a12401b65a5ba57cfe1361c9a3e054ffde68611
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.

Fixes: 42f39036cda8 ("net/sched: act_mirred: Allow mirred to block")
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://lore.kernel.org/r/20240207222902.1469398-1-victor@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/act_mirred.c