syzbot


inconsistent lock state in valid_state

Status: upstream: reported C repro on 2026/04/18 18:50
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+939326ce26153c515dc2@syzkaller.appspotmail.com
First crash: 7d04h, last: 6d22h
Bug presence (1)
Date Name Commit Repro Result
2026/04/19 upstream (ToT) faeab166167f C [report] inconsistent lock state in __sk_receive_skb
Similar bugs (11)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 inconsistent lock state in valid_state (2) missing-backport 4 C done 208 555d 773d 0/3 auto-obsoleted due to no activity on 2024/12/26 10:49
linux-5.15 inconsistent lock state in valid_state (3) origin:upstream 4 C 8 18h57m 5d00h 0/3 upstream: reported C repro on 2026/04/20 22:51
upstream inconsistent lock state in valid_state (6) kernfs comedi 4 2 189d 188d 0/29 auto-obsoleted due to no activity on 2026/01/26 19:03
upstream inconsistent lock state in valid_state kernel 4 1 1157d 1153d 0/29 auto-obsoleted due to no activity on 2023/06/23 05:39
upstream inconsistent lock state in valid_state (4) linux1394 ppp 4 C error 72 439d 614d 0/29 auto-obsoleted due to no activity on 2025/04/21 16:31
linux-5.15 inconsistent lock state in valid_state 4 2 1046d 1125d 0/3 auto-obsoleted due to no activity on 2023/09/22 20:18
linux-6.1 inconsistent lock state in valid_state (2) origin:upstream missing-backport 4 C done 338 4d20h 945d 0/3 upstream: reported C repro on 2023/09/22 23:56
upstream inconsistent lock state in valid_state (5) net 4 515 234d 238d 0/29 closed as invalid on 2025/09/16 17:45
upstream inconsistent lock state in valid_state (2) sound 4 C inconclusive 57405 684d 808d 25/29 fixed on 2024/06/11 03:41
upstream inconsistent lock state in valid_state (3) mm 4 C error 376 631d 680d 27/29 fixed on 2024/08/14 03:44
linux-6.1 inconsistent lock state in valid_state 4 1 1126d 1126d 0/3 auto-obsoleted due to no activity on 2023/07/24 01:34

Sample crash report:
================================
WARNING: inconsistent lock state
syzkaller #0 Not tainted
--------------------------------
inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
syz.0.17/5918 [HC0[0]:SC1[1]:HE1:SE0] takes:
ffff888029d880b0 (slock-AF_PHONET/1){+.?.}-{2:2}, at: __sk_receive_skb+0x180/0x990 net/core/sock.c:564
{SOFTIRQ-ON-W} state was registered at:
  lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
  _raw_spin_lock_nested+0x32/0x50 kernel/locking/spinlock.c:378
  __sk_receive_skb+0x180/0x990 net/core/sock.c:564
  sk_receive_skb include/net/sock.h:2071 [inline]
  pep_do_rcv+0x682/0xa90 net/phonet/pep.c:675
  sk_backlog_rcv include/net/sock.h:1142 [inline]
  __release_sock+0x1e5/0x460 net/core/sock.c:3011
  release_sock+0x5f/0x1c0 net/core/sock.c:3550
  pep_sock_accept+0xd58/0x12d0 net/phonet/pep.c:879
  pn_socket_accept+0x12a/0x370 net/phonet/socket.c:304
  do_accept+0x4d8/0x6c0 net/socket.c:1937
  __sys_accept4_file net/socket.c:1977 [inline]
  __sys_accept4+0x9b/0x100 net/socket.c:2007
  __do_sys_accept4 net/socket.c:2018 [inline]
  __se_sys_accept4 net/socket.c:2015 [inline]
  __x64_sys_accept4+0x9a/0xb0 net/socket.c:2015
  do_syscall_x64 arch/x86/entry/common.c:46 [inline]
  do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
  entry_SYSCALL_64_after_hwframe+0x68/0xd2
irq event stamp: 106
hardirqs last  enabled at (106): [<ffffffff8a8ff4f3>] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline]
hardirqs last  enabled at (106): [<ffffffff8a8ff4f3>] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202
hardirqs last disabled at (105): [<ffffffff8a8ff2ba>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline]
hardirqs last disabled at (105): [<ffffffff8a8ff2ba>] _raw_spin_lock_irq+0x8a/0xf0 kernel/locking/spinlock.c:170
softirqs last  enabled at (100): [<ffffffff8879e2f9>] local_bh_enable include/linux/bottom_half.h:33 [inline]
softirqs last  enabled at (100): [<ffffffff8879e2f9>] netif_rx+0x79/0x90 net/core/dev.c:5232
softirqs last disabled at (101): [<ffffffff8152678a>] do_softirq+0xfa/0x1a0 kernel/softirq.c:479

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(slock-AF_PHONET/1);
  <Interrupt>
    lock(slock-AF_PHONET/1);

 *** DEADLOCK ***

4 locks held by syz.0.17/5918:
 #0: ffff88802a688770 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1780 [inline]
 #0: ffff88802a688770 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: pep_sendmsg+0x799/0xad0 net/phonet/pep.c:1198
 #1: ffffffff8d1320e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
 #1: ffffffff8d1320e0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
 #1: ffffffff8d1320e0 (rcu_read_lock){....}-{1:2}, at: process_backlog+0x2cf/0x6f0 net/core/dev.c:6087
 #2: ffff88802a6880b0 (slock-AF_PHONET){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #2: ffff88802a6880b0 (slock-AF_PHONET){+.-.}-{2:2}, at: __sk_receive_skb+0x18f/0x990 net/core/sock.c:566
 #3: ffff88802a688130 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: sk_receive_skb include/net/sock.h:2071 [inline]
 #3: ffff88802a688130 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: phonet_rcv+0x78f/0xc80 net/phonet/af_phonet.c:-1

stack backtrace:
CPU: 0 PID: 5918 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
 <IRQ>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 valid_state+0x13b/0x1d0 kernel/locking/lockdep.c:4013
 mark_lock_irq+0xad/0x900 kernel/locking/lockdep.c:4216
 mark_lock+0x208/0x320 kernel/locking/lockdep.c:4678
 mark_usage kernel/locking/lockdep.c:-1 [inline]
 __lock_acquire+0xd1a/0x7d40 kernel/locking/lockdep.c:5091
 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
 _raw_spin_lock_nested+0x32/0x50 kernel/locking/spinlock.c:378
 __sk_receive_skb+0x180/0x990 net/core/sock.c:564
 sk_receive_skb include/net/sock.h:2071 [inline]
 pep_do_rcv+0x682/0xa90 net/phonet/pep.c:675
 sk_backlog_rcv include/net/sock.h:1142 [inline]
 __sk_receive_skb+0x436/0x990 net/core/sock.c:573
 sk_receive_skb include/net/sock.h:2071 [inline]
 phonet_rcv+0x78f/0xc80 net/phonet/af_phonet.c:-1
 __netif_receive_skb_one_core net/core/dev.c:5646 [inline]
 __netif_receive_skb+0xcc/0x290 net/core/dev.c:5760
 process_backlog+0x391/0x6f0 net/core/dev.c:6088
 __napi_poll+0xc0/0x460 net/core/dev.c:6650
 napi_poll net/core/dev.c:6717 [inline]
 net_rx_action+0x616/0xc40 net/core/dev.c:6853
 handle_softirqs+0x280/0x820 kernel/softirq.c:578
 do_softirq+0xfa/0x1a0 kernel/softirq.c:479
 </IRQ>
 <TASK>
 __local_bh_enable_ip+0x184/0x1c0 kernel/softirq.c:406
 local_bh_enable include/linux/bottom_half.h:33 [inline]
 netif_rx+0x83/0x90 net/core/dev.c:5232
 pn_send+0x553/0x7f0 net/phonet/af_phonet.c:185
 pn_skb_send+0x218/0x510 net/phonet/af_phonet.c:272
 pipe_skb_send+0x2d7/0x500 net/phonet/pep.c:1129
 pep_sendmsg+0x9aa/0xad0 net/phonet/pep.c:1205
 pn_socket_sendmsg+0x1df/0x240 net/phonet/socket.c:425
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 sock_write_iter+0x2df/0x420 net/socket.c:1160
 call_write_iter include/linux/fs.h:2018 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x46c/0x990 fs/read_write.c:584
 ksys_write+0x150/0x260 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f4d3039c819
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:00007f4d311ae028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f4d30616090 RCX: 00007f4d3039c819
RDX: 00000000000003db RSI: 0000200000000480 RDI: 0000000000000006
RBP: 00007f4d30432c91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4d30616128 R14: 00007f4d30616090 R15: 00007ffff630e2d8
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/19 00:49 linux-6.6.y 9760bf04666d 303e2802 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan inconsistent lock state in valid_state
2026/04/18 18:49 linux-6.6.y 9760bf04666d 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan inconsistent lock state in valid_state
* Struck through repros no longer work on HEAD.