]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/sched: act_mirred: add loop detection
authorEric Dumazet <edumazet@google.com>
Tue, 14 Oct 2025 17:19:04 +0000 (17:19 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Oct 2025 23:25:10 +0000 (16:25 -0700)
commitfe946a751d9b52b7c45ca34899723b314b79b249
tree0d6817a62f4c833b8370a3522f18884a4d7fda68
parent5b2b7dec05f3ab80d7bb7fa09acd43222fab6aa2
net/sched: act_mirred: add loop detection

Commit 0f022d32c3ec ("net/sched: Fix mirred deadlock on device recursion")
added code in the fast path, even when act_mirred is not used.

Prepare its revert by implementing loop detection in act_mirred.

Adds an array of device pointers in struct netdev_xmit.

tcf_mirred_is_act_redirect() can detect if the array
already contains the target device.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Tested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20251014171907.3554413-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netdevice_xmit.h
net/sched/act_mirred.c