| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/06 20:05 | flow | finding-triage |
0mArgs:null Results: {
"Introduced": false,
"Reasoning": "The crash report shows a lockdep limit exhaustion (`BUG: MAX_LOCK_DEPTH too low!`) caused by recursive packet transmission in `ipvlan` (`ipvlan_queue_xmit` -\u003e `ipvlan_start_xmit` -\u003e `dev_hard_start_xmit` -\u003e `sch_direct_xmit` -\u003e `__dev_queue_xmit` -\u003e `ip6_output` -\u003e `ipvlan_queue_xmit`...) initiated from SCTP transmit (`sctp_sendmsg`). This recursion accumulated 48 locks (repeatedly taking `rcu_read_lock`, `rcu_read_lock_bh`, and `qdisc_tx_busylock`), reaching lockdep's `MAX_LOCK_DEPTH`.\n\nThe patch under test modifies `netif_set_threaded()` in `net/core/dev.c` to disallow disabling NAPI threaded mode when NAPI instances are disabled. It does not touch SCTP, IPv6 routing, ipvlan, qdisc locking, or general packet transmission logic. The recursive transmission loop leading to lockdep depth exhaustion is an unrelated, pre-existing networking/routing configuration issue triggered during fuzzing."
} |
| 1/1 | 2026/10/06 20:05 | action | prepare-finding-overview |
0mArgs:null Results: {
"DiffStat": "net/core/dev.c | 6 ++++++\n 1 file changed, 6 insertions(+)",
"HasCover": false,
"PatchCount": 1,
"PatchList": "The patch series contains 1 patch:\n[1] [PATCH net v2] net: Don't allow disabling napi kthread mode while napi instances are disabled"
} |
| 2/1 | 2026/10/06 20:05 | agent | finding-triage-evaluator |
0mModel:core Args: null Results: {
"Introduced": false,
"Reasoning": "The crash report shows a lockdep limit exhaustion (`BUG: MAX_LOCK_DEPTH too low!`) caused by recursive packet transmission in `ipvlan` (`ipvlan_queue_xmit` -\u003e `ipvlan_start_xmit` -\u003e `dev_hard_start_xmit` -\u003e `sch_direct_xmit` -\u003e `__dev_queue_xmit` -\u003e `ip6_output` -\u003e `ipvlan_queue_xmit`...) initiated from SCTP transmit (`sctp_sendmsg`). This recursion accumulated 48 locks (repeatedly taking `rcu_read_lock`, `rcu_read_lock_bh`, and `qdisc_tx_busylock`), reaching lockdep's `MAX_LOCK_DEPTH`.\n\nThe patch under test modifies `netif_set_threaded()` in `net/core/dev.c` to disallow disabling NAPI threaded mode when NAPI instances are disabled. It does not touch SCTP, IPv6 routing, ipvlan, qdisc locking, or general packet transmission logic. The recursive transmission loop leading to lockdep depth exhaustion is an unrelated, pre-existing networking/routing configuration issue triggered during fuzzing."
}Instruction: You are an expert Linux kernel maintainer and security engineer specializing
in crash triage and root-cause analysis.
Your job is to review a kernel crash report (finding) and determine if it was introduced / caused
by the patch series being tested, or if it is a pre-existing / unrelated bug.
IMPORTANT: The entire patch series has ALREADY been applied and committed as a single squashed commit
at HEAD (or on top of the base commit) in your workspace.
Do NOT rely on your internal knowledge of the kernel. You must actively use your tools to examine
the source code, inspect workspace diffs, and confirm any assumptions.
Available Tools:
- git-show: View the squashed patch series commit or historical commits. Call with Commit="HEAD" (default)
and optional 'File' parameter to restrict the diff to a specific file or directory, or 'Stat=true' for a diffstat.
- series-patches: Browse the original patch series. Call without arguments to list all patch titles,
or PatchNum=<N> to view the full description and diff of a specific patch (or cover letter, if present).
- read-file & codesearch-dir-index: Read exact source code files and directory contents in the workspace.
- grepper: Regex search across files in the workspace (git grep).
- git-blame: Inspect line authorship and find which commit last modified specific lines of code.
Triage Procedure:
1. Analyze the Crash Report:
- Identify the crash type (e.g. NULL dereference, KASAN use-after-free, out-of-bounds read/write,
assertion failure, deadlock).
- Carefully examine the stack trace(s) — both the faulting call stack and, if applicable (e.g., KASAN UAF),
the allocation and free stacks.
- Note the faulting function, file name, line numbers, and the specific variables or data structures involved.
2. Inspect Workspace Changes & Patch Series:
- Check if any files or functions from the stack trace appear in the modified files overview or the patch series.
- Use git-show with Commit="HEAD" and 'File' to inspect the exact diffs for relevant files
in the squashed commit.
- If needed, use series-patches with PatchNum=<N> to inspect the author's commit description
and rationale for individual patches in the series.
- Use read-file to inspect the actual source code at the faulting lines.
3. Determine Causality:
- Set Introduced=true ONLY IF you are absolutely certain:
* There is clear, unambiguous, and conclusive evidence that the crash was directly introduced
or caused by the patch series.
* The crash occurs directly in new or modified code introduced by the patch series, or the patch series
altered data structures, locking, object lifetimes, or preconditions in a way that directly
triggered the failure in existing code.
- Set Introduced=false IF:
* There is any doubt, ambiguity, or lack of conclusive proof that the patch series caused the bug.
* The crash occurs in an unrelated subsystem or unmodified code path whose behavior is independent
of the patch series.
* The crash is a pre-existing kernel issue that was randomly triggered during fuzzing.
4. Formulate Output:
- Set Introduced to true or false.
- In Reasoning, provide a clear, step-by-step technical explanation detailing the crash type,
the key stack frames, whether the affected code/structures were modified by the patch series,
and the causal justification for your verdict.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
The kernel crash report to triage is:
BUG: MAX_LOCK_DEPTH too low!
turning off the locking correctness validator.
depth: 48 max: 48!
locks held by syz.2.8635/8468: 48, last CPU#1:
#0: ffff88818b4b8be0 (sk_lock-AF_INET6){+.+.}-{0:0}, at: sctp_sendmsg+0xbb8/0x2d00
#1: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: sctp_v6_xmit+0x63f/0x13a0
#2: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_xmit+0x273/0x1a60
#3: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#4: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#5: ffff8881b6bbf228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#6: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#7: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#8: ffff8881a095d228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#9: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#10: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#11: ffff8881a095c228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#12: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#13: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#14: ffff8881b715e228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#15: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#16: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#17: ffff8881b8952228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#18: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#19: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#20: ffff8881b8956228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#21: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#22: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#23: ffff8881b97c6228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#24: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#25: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#26: ffff88818e97e228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#27: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#28: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#29: ffff88818e97a228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#30: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#31: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#32: ffff8881bb639228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#33: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#34: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#35: ffff8881bb638228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#36: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#37: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#38: ffff8881be711228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#39: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#40: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#41: ffff8881be712228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#42: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540
#43: ffffffff8ed5c980 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820
#44: ffff8881b6927228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#9){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820
#45: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_route_output_flags+0x2e/0x5d0
#46: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: fib_rules_lookup+0x99/0xeb0
#47: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: ip6_pol_route+0x163/0x14d0
INFO: lockdep is turned off.
CPU: 1 UID: 0 PID: 8468 Comm: syz.2.8635 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150
__lock_acquire+0x268e/0x2de0
lock_acquire+0x115/0x350
ip6_pol_route+0x184/0x14d0
fib6_rule_action+0x265/0xc00
fib_rules_lookup+0x770/0xeb0
fib6_rule_lookup+0x19b/0x6e0
ip6_route_output_flags+0x364/0x5d0
ipvlan_route_v6_outbound+0x217/0x4d0
ipvlan_queue_xmit+0xa18/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ipvlan_queue_xmit+0xa76/0x16b0
ipvlan_start_xmit+0x4a/0x130
dev_hard_start_xmit+0x2cd/0x830
sch_direct_xmit+0x257/0x4c0
__dev_queue_xmit+0x177f/0x3820
ip6_output+0x337/0x540
ip6_xmit+0x117f/0x1a60
sctp_v6_xmit+0xa85/0x13a0
sctp_packet_transmit+0x25d0/0x2bb0
sctp_packet_singleton+0x22f/0x340
sctp_outq_flush+0x4fb/0x3380
sctp_do_sm+0x55a1/0x5dd0
sctp_primitive_ASSOCIATE+0x95/0xc0
sctp_sendmsg_to_asoc+0x13fb/0x1880
sctp_sendmsg+0x1bb5/0x2d00
sock_sendmsg_nosec+0x10e/0x180
____sys_sendmsg+0x54e/0x850
___sys_sendmsg+0x2a5/0x360
__sys_sendmmsg+0x273/0x4d0
__x64_sys_sendmmsg+0xa0/0xc0
do_syscall_64+0x166/0x520
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff5b3d9e199
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff5b4b9b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007ff5b4025fa0 RCX: 00007ff5b3d9e199
RDX: 0000000000000002 RSI: 0000200000001e80 RDI: 0000000000000003
RBP: 00007ff5b3e350b8 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000200040c0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ff5b4026038 R14: 00007ff5b4025fa0 R15: 00007ffe5d443ce8
</TASK>
Overview of modified files in the workspace:
net/core/dev.c | 6 ++++++
1 file changed, 6 insertions(+)
The patch series contains 1 patch:
[1] [PATCH net v2] net: Don't allow disabling napi kthread mode while napi instances are disabled
|
| 3/2 | 2026/10/06 20:05 | llm | finding-triage-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8140 output: 10 thoughts: 264 Thoughts: **Analyzing a Lock Depth Issue** Okay, here's what I'm seeing: This crash report, with the "BUG: MAX_LOCK_DEPTH too low!" error, immediately grabs my attention. The system's complaining about exceeding the maximum lock depth of 48, which has triggered the locking correctness validator to disable itself. That's never a good sign. Looking at the stack trace, the problem seems to be originating within the SCTP send path. We've got `sctp_sendmsg` leading down a familiar path: it eventually hits `ip6_xmit`, then `ip6_output`, and the critical piece here is the `ipvlan_queue_xmit` function. And it appears this function is getting called recursively: `ipvlan_queue_xmit -> ipvlan_start_xmit -> dev_hard_start_xmit -> sch_direct_xmit -> __dev_queue_xmit -> ip6_output -> ipvlan_queue_xmit`. We can see it looping back on itself. At each level of the `xmit` path, various locks are being acquired. Locks like `rcu_read_lock`, `rcu_read_lock_bh`, and `dev->qdisc_tx_busylock` are all being accumulated. And the system eventually hits the lock depth limit. This recursive lock acquisition within the networking stack looks like the smoking gun. Now, my next step is to examine the patch series under test. I'll use `git-show` or `series-patches` to identify any recent changes to this code path, specifically anything related to IPv6, the device driver, or the locking mechanisms within the network stack. I'm going to bet that one of those changes is introducing a new lock ordering that's causing this depth overflow. |
| 4/2 | 2026/10/06 20:05 | tool | git-show |
0mArgs:null Results: {
"Output": "commit 03accb43cc79d5c39633ef4895c20eea5a3b0aba\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Tue Oct 6 20:05:06 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/net/core/dev.c b/net/core/dev.c\nindex f660fccfc0dbc..fcf18c9eedb84 100644\n--- a/net/core/dev.c\n+++ b/net/core/dev.c\n@@ -7315,6 +7315,12 @@ int netif_set_threaded(struct net_device *dev,\n \t\t\t\t}\n \t\t\t}\n \t\t}\n+\t} else {\n+\t\tlist_for_each_entry(napi, \u0026dev-\u003enapi_list, dev_list) {\n+\t\t\tif (napi-\u003ethread \u0026\u0026\n+\t\t\t test_bit(NAPI_STATE_NPSVC, \u0026napi-\u003estate))\n+\t\t\t\treturn -EBUSY;\n+\t\t}\n \t}\n \n \tWRITE_ONCE(dev-\u003ethreaded, threaded);\n"
} |
| 5/2 | 2026/10/06 20:05 | llm | finding-triage-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9124 output: 15 thoughts: 119 Thoughts: Okay, let's dive into this code snippet. **Analyzing the `netif_set_threaded` Function** Alright, I'm looking at this `netif_set_threaded` function and specifically this addition. It seems like we're checking for something before allowing the threading of a NAPI instance. Let's break it down. We're iterating through the `napi_list` associated with the device (`dev`). The core logic is within that `list_for_each_entry` loop. For each NAPI instance (`napi`) on the list, there's a condition: We want to see if the NAPI instance already has a thread assigned (`napi->thread`) *and* if it's currently in a state that indicates it's actively servicing packets (`test_bit(NAPI_STATE_NPSVC, &napi->state)`). If both of these conditions are met, then we return `-EBUSY`. Essentially, it is preventing a race condition. It looks like it is checking to see if a NAPI instance is already running in a dedicated thread and actively processing work, and it's refusing to change that configuration to another thread until it's not busy. Now, let me check the series patches to see the context and the rationale behind this patch 1. It is important to know the background here. |
| 6/2 | 2026/10/06 20:05 | tool | series-patches |
0mArgs:{
"PatchNum": 1
}Results: {
"Output": "Patch [1] [PATCH net v2] net: Don't allow disabling napi kthread mode while napi instances are disabled:\n\nTrying to disable the napi threaded state while the napi instance is\ndisabled will hang forever in napi_stop_kthread(), as it waits for\nNAPIF_STATE_SCHED_THREADED to clear.\n\nThis won't happen until the next ____napi_schedule() call, which won't\nhappen as it's disabled.\n\nThis happens in 2 instances :\n\n - Drivers that create but don't use napi instances (stmmac's rxtx napi\n for AF_XDP for example), here it's a driver bug\n\n - Drivers that create their napi instances in .probe(). Here, setting\n threaded off while the interface is down will hang :\n\n ip link set eth0 down\n echo 1 \u003e /sys/class/net/eth0/threaded\n echo 0 \u003e /sys/class/net/eth0/threaded\n -\u003e hang\n\nChecking on netif_running() isn't enough, as napi instances may be\ntransiently disabled when changing the MTU for example, so let's check\nthe NAPIF_STATE_NPSVC flag instead, that's clear when the napi instance\nis enabled.\n\nThis fix only addresses the second case. For the first case where\ndrivers have unused napi instances, the \"threaded\" mode can't be\nswitched off once enabled, these drivers will need fixing. As this\nhasn't been seen before on said drivers, I guess it's OK as it used to\njust freeze the system.\n\nThis was tested on mvpp2 (probe-time napi_add) and stmmac.\n\nFixes: 689883de94dd (\"net: stop napi kthreads when THREADED napi is disabled\")\nSigned-off-by: Maxime Chevallier \u003cmaxime.chevallier@bootlin.com\u003e\n---\nV2:\n - Different approach as per Jakub's review, just don't allow setting\n the napi threaded mode while interface is down.\n\n I'm unsure about the correctness of this, to me it seems that the\n NAPI_STATE_NPSVC flag indicates the condition we're interested in (is\n napi instance enabled or not ?), but I may be missing something\n obvious :(\n\nV1:\nhttps://lore.kernel.org/r/20260926194714.648819-1-maxime.chevallier@bootlin.com\n\n net/core/dev.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/net/core/dev.c b/net/core/dev.c\nindex f660fccfc0db..fcf18c9eedb8 100644\n--- a/net/core/dev.c\n+++ b/net/core/dev.c\n@@ -7315,6 +7315,12 @@ int netif_set_threaded(struct net_device *dev,\n \t\t\t\t}\n \t\t\t}\n \t\t}\n+\t} else {\n+\t\tlist_for_each_entry(napi, \u0026dev-\u003enapi_list, dev_list) {\n+\t\t\tif (napi-\u003ethread \u0026\u0026\n+\t\t\t test_bit(NAPI_STATE_NPSVC, \u0026napi-\u003estate))\n+\t\t\t\treturn -EBUSY;\n+\t\t}\n \t}\n \n \tWRITE_ONCE(dev-\u003ethreaded, threaded);\n-- \n2.55.0"
} |
| 7/2 | 2026/10/06 20:05 | llm | finding-triage-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10386 output: 28 thoughts: 234 Thoughts: **Analyzing a Nasty Kernel Bug** Okay, so this patch is supposedly related to a `netif_set_threaded()` change in `net/core/dev.c`. Hmm, the patch itself is designed to prevent disabling NAPI threaded mode if NAPI instances are disabled. Interesting, but does it really have anything to do with this crash? The core of the problem is a `BUG: MAX_LOCK_DEPTH too low!` error, and it's happening deep within the networking stack. We're seeing a recursion: `sctp_sendmsg` to `ip6_xmit`, then `ip6_output`, into `ipvlan_queue_xmit` and on and on... eventually ending in `__dev_queue_xmit` and cycling back to `ip6_output` and `ipvlan_queue_xmit`. My initial thought is to see if `netif_set_threaded` has any direct link to ipvlan recursion or anything like `sctp`, or especially the `dev_queue_xmit` function - but it seems completely unrelated. Given my experience, the `MAX_LOCK_DEPTH` error triggered by ipvlan recursion rings some bells. I've encountered this issue before, and it's often caused by ipvlan interfaces configured in a loop, stacked recursively, or routing in a loop through the ipvlan interfaces. It looks like the patch is a red herring. Time to dive deeper into the ipvlan recursion code itself. I'll search for similar issues and see what the community has come up with to address this type of problem. |
| 8/2 | 2026/10/06 20:05 | tool | grepper |
0mArgs:{
"Expression": "MAX_LOCK_DEPTH",
"PathPrefixes": [
"net/"
]
}Results: {
"Output": "net/core/dev.c=12437=static void netif_close_many_and_unlock_cond(struct list_head *close_head)\n--\nnet/core/dev.c-12439-#ifdef CONFIG_LOCKDEP\nnet/core/dev.c:12440:\t/* We can only track up to MAX_LOCK_DEPTH locks per task.\nnet/core/dev.c-12441-\t *\n--\nnet/core/dev.c-12444-\t */\nnet/core/dev.c:12445:\tunsigned int limit = MAX_LOCK_DEPTH / 2;\nnet/core/dev.c-12446-\n"
} |
| 9/2 | 2026/10/06 20:05 | llm | finding-triage-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11172 output: 36 thoughts: 43 Thoughts: Okay, let's dive in. **Investigating Network Device Initialization** Alright, I need to get to the bottom of this. My first instinct is to zero in on line 12440 within `net/core/dev.c`. I'll start there, see what that section of code is doing and what context it's working in. But before I lock in on that specific line, it's probably best to take a step back and get a broader understanding of related functions. I need to refresh my memory on the purpose and application of `netif_set_threaded`. I should also trace where this particular function gets invoked throughout the codebase. Understanding those call sites should help me establish a clearer context and a better grasp of the broader picture. This will likely provide a more complete view and better inform my investigation. |
| 10/2 | 2026/10/06 20:05 | tool | read-file |
0mArgs:{
"File": "net/core/dev.c",
"FirstLine": 7305,
"LineCount": 40
}Results: {
"Contents": "7305:\t\n7306:\t\tnetdev_assert_locked_or_invisible(dev);\n7307:\t\n7308:\t\tif (threaded) {\n7309:\t\t\tlist_for_each_entry(napi, \u0026dev-\u003enapi_list, dev_list) {\n7310:\t\t\t\tif (!napi-\u003ethread) {\n7311:\t\t\t\t\terr = napi_kthread_create(napi);\n7312:\t\t\t\t\tif (err) {\n7313:\t\t\t\t\t\tthreaded = NETDEV_NAPI_THREADED_DISABLED;\n7314:\t\t\t\t\t\tbreak;\n7315:\t\t\t\t\t}\n7316:\t\t\t\t}\n7317:\t\t\t}\n7318:\t\t} else {\n7319:\t\t\tlist_for_each_entry(napi, \u0026dev-\u003enapi_list, dev_list) {\n7320:\t\t\t\tif (napi-\u003ethread \u0026\u0026\n7321:\t\t\t\t test_bit(NAPI_STATE_NPSVC, \u0026napi-\u003estate))\n7322:\t\t\t\t\treturn -EBUSY;\n7323:\t\t\t}\n7324:\t\t}\n7325:\t\n7326:\t\tWRITE_ONCE(dev-\u003ethreaded, threaded);\n7327:\t\n7328:\t\t/* The error should not occur as the kthreads are already created. */\n7329:\t\tlist_for_each_entry(napi, \u0026dev-\u003enapi_list, dev_list)\n7330:\t\t\tWARN_ON_ONCE(napi_set_threaded(napi, threaded));\n7331:\t\n7332:\t\t/* Override the config for all NAPIs even if currently not listed */\n7333:\t\tfor (i = 0; i \u003c dev-\u003enum_napi_configs; i++)\n7334:\t\t\tdev-\u003enapi_config[i].threaded = threaded;\n7335:\t\n7336:\t\treturn err;\n7337:\t}\n7338:\t\n7339:\t/**\n7340:\t * netif_threaded_enable() - enable threaded NAPIs\n7341:\t * @dev: net_device instance\n7342:\t *\n7343:\t * Enable threaded mode for the NAPI instances of the device. This may be useful\n7344:\t * for devices where multiple NAPI instances get scheduled by a single\n"
} |
| 11/2 | 2026/10/06 20:05 | llm | finding-triage-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 12039 output: 274 thoughts: 859 Thoughts: **Analysis of the MAX_LOCK_DEPTH Crash** Okay, so the crash report is screaming "MAX_LOCK_DEPTH exceeded!" and the stack trace clearly shows a vicious recursion: `sctp_sendmsg` triggering an `ipvlan` loop that’s bouncing packets around between devices: `ipvlan_queue_xmit` -> `sch_direct_xmit` -> `__dev_queue_xmit` -> `ip6_output` and back into `ipvlan_queue_xmit` repeatedly. And we are looking at 48 locks, most of them `rcu_read_lock`, `rcu_read_lock_bh`, and `qdisc_tx_busylock` which means a massive amount of packet queuing and RCU reads going on. No surprises that lockdep blows up. Now, let's step back and consider the *claimed* culprit: the `netif_set_threaded` change. This is a sysfs attribute write. My initial thought is: this isn't NAPI-related! I mean, I looked at the functions involved in the crash, and not one of them has anything to do with threaded NAPI or that particular function, which is located in `net/core/dev.c`. I even double-checked the header files to make sure the patch somehow affected something else in the vicinity, but nothing in the patch itself seems connected to ipvlan, or sctp, or anything in the entire stack trace. The patch adds a few lines to check if NAPI is currently threaded before disallowing a change in the state of `netif_set_threaded`. So, the crash comes down to a packet transmission loop on `ipvlan` devices, hitting the lock depth limit. It's clearly a pre-existing bug – a classic routing/forwarding loop. The patch has nothing to do with this. Therefore, the triage is straightforward: 1. Crash is a MAX_LOCK_DEPTH issue triggered by a recursive loop. 2. The provided patch modifies `netif_set_threaded`, which is in `net/core/dev.c`. 3. The patch has no influence on the crash. Time to prepare the call to `set-results`. |
| 12/2 | 2026/10/06 20:05 | tool | set-results |
0mArgs:{
"Introduced": false,
"Reasoning": "The crash report shows a lockdep limit exhaustion (`BUG: MAX_LOCK_DEPTH too low!`) caused by recursive packet transmission in `ipvlan` (`ipvlan_queue_xmit` -\u003e `ipvlan_start_xmit` -\u003e `dev_hard_start_xmit` -\u003e `sch_direct_xmit` -\u003e `__dev_queue_xmit` -\u003e `ip6_output` -\u003e `ipvlan_queue_xmit`...) initiated from SCTP transmit (`sctp_sendmsg`). This recursion accumulated 48 locks (repeatedly taking `rcu_read_lock`, `rcu_read_lock_bh`, and `qdisc_tx_busylock`), reaching lockdep's `MAX_LOCK_DEPTH`.\n\nThe patch under test modifies `netif_set_threaded()` in `net/core/dev.c` to disallow disabling NAPI threaded mode when NAPI instances are disabled. It does not touch SCTP, IPv6 routing, ipvlan, qdisc locking, or general packet transmission logic. The recursive transmission loop leading to lockdep depth exhaustion is an unrelated, pre-existing networking/routing configuration issue triggered during fuzzing."
}Results: {
"Introduced": false,
"Reasoning": "The crash report shows a lockdep limit exhaustion (`BUG: MAX_LOCK_DEPTH too low!`) caused by recursive packet transmission in `ipvlan` (`ipvlan_queue_xmit` -\u003e `ipvlan_start_xmit` -\u003e `dev_hard_start_xmit` -\u003e `sch_direct_xmit` -\u003e `__dev_queue_xmit` -\u003e `ip6_output` -\u003e `ipvlan_queue_xmit`...) initiated from SCTP transmit (`sctp_sendmsg`). This recursion accumulated 48 locks (repeatedly taking `rcu_read_lock`, `rcu_read_lock_bh`, and `qdisc_tx_busylock`), reaching lockdep's `MAX_LOCK_DEPTH`.\n\nThe patch under test modifies `netif_set_threaded()` in `net/core/dev.c` to disallow disabling NAPI threaded mode when NAPI instances are disabled. It does not touch SCTP, IPv6 routing, ipvlan, qdisc locking, or general packet transmission logic. The recursive transmission loop leading to lockdep depth exhaustion is an unrelated, pre-existing networking/routing configuration issue triggered during fuzzing."
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|