Re: [PATCH net v2] net: reduce XMIT_RECURSION_LIMIT under KASAN
From: Jakub Kicinski
Date: Tue Jul 21 2026 - 16:11:14 EST
On Sat, 11 Jul 2026 20:47:00 +0000 Tristan Madani wrote:
> Virtual network devices (ipvlan, macvlan, bonding) can enter legitimate
> transmit recursion when combined with packet forwarding configurations
> such as IPVS NAT. The existing XMIT_RECURSION_LIMIT (8) in
> __dev_queue_xmit() detects and breaks these loops, but the allowed
> depth is too high for KASAN-instrumented kernels: each recursion level
> consumes significantly more stack due to KASAN inline instrumentation,
> and the cumulative usage overflows the kernel stack before the limit
> fires.
This patch was marked as changes requested, I'm not sure why.
If it is still valid please repost (please start a new thread,
please add a link to the previous posting under --- like this:
v3:
- no changes
v2: https://lore.kernel.org/20260711204700.1760374-1-tristmd@xxxxxxxxx