syzbot


inconsistent lock state in rxrpc_put_client_conn

Status: upstream: reported C repro on 2020/02/14 22:06
Reported-by: syzbot+6eafa608d39089492895@syzkaller.appspotmail.com
First crash: 1585d, last: 470d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 inconsistent lock state in rxrpc_put_client_conn C done 6584 1572d 1589d 1/1 fixed on 2020/03/30 09:03
upstream inconsistent lock state in rxrpc_put_client_conn C done 18198 1590d 1596d 15/27 fixed on 2020/02/18 14:31

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
================================
WARNING: inconsistent lock state
4.14.300-syzkaller #0 Not tainted
--------------------------------
inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
swapper/1/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
 (&(&local->client_conns_lock)->rlock){+.?.}, at: [<ffffffff867da981>] spin_lock include/linux/spinlock.h:317 [inline]
 (&(&local->client_conns_lock)->rlock){+.?.}, at: [<ffffffff867da981>] rxrpc_put_one_client_conn net/rxrpc/conn_client.c:905 [inline]
 (&(&local->client_conns_lock)->rlock){+.?.}, at: [<ffffffff867da981>] rxrpc_put_client_conn+0x661/0xac0 net/rxrpc/conn_client.c:957
{SOFTIRQ-ON-W} state was registered at:
  lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
  __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
  _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152
  spin_lock include/linux/spinlock.h:317 [inline]
  rxrpc_get_client_conn net/rxrpc/conn_client.c:306 [inline]
  rxrpc_connect_call+0x2bb/0x3e10 net/rxrpc/conn_client.c:692
  rxrpc_new_client_call+0x8f4/0x1a10 net/rxrpc/call_object.c:276
  rxrpc_new_client_call_for_sendmsg net/rxrpc/sendmsg.c:531 [inline]
  rxrpc_do_sendmsg+0x8dc/0xfb0 net/rxrpc/sendmsg.c:583
  rxrpc_sendmsg+0x3cf/0x5f0 net/rxrpc/af_rxrpc.c:543
  sock_sendmsg_nosec net/socket.c:646 [inline]
  sock_sendmsg+0xb5/0x100 net/socket.c:656
  ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
  __sys_sendmsg+0xa3/0x120 net/socket.c:2096
  SYSC_sendmsg net/socket.c:2107 [inline]
  SyS_sendmsg+0x27/0x40 net/socket.c:2103
  do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
  entry_SYSCALL_64_after_hwframe+0x5e/0xd3
irq event stamp: 92156
hardirqs last  enabled at (92156): [<ffffffff8724b6c9>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
hardirqs last  enabled at (92156): [<ffffffff8724b6c9>] _raw_spin_unlock_irqrestore+0x79/0xe0 kernel/locking/spinlock.c:192
hardirqs last disabled at (92155): [<ffffffff8724b356>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
hardirqs last disabled at (92155): [<ffffffff8724b356>] _raw_spin_lock_irqsave+0x66/0xc0 kernel/locking/spinlock.c:160
softirqs last  enabled at (91800): [<ffffffff81322b4d>] irq_enter+0xbd/0xd0 kernel/softirq.c:350
softirqs last disabled at (91801): [<ffffffff81322cf3>] invoke_softirq kernel/softirq.c:368 [inline]
softirqs last disabled at (91801): [<ffffffff81322cf3>] irq_exit+0x193/0x240 kernel/softirq.c:409

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

       CPU0
       ----
  lock(&(&local->client_conns_lock)->rlock);
  <Interrupt>
    lock(&(&local->client_conns_lock)->rlock);

 *** DEADLOCK ***

1 lock held by swapper/1/0:
 #0:  (rcu_callback){....}, at: [<ffffffff8146ebce>] __rcu_reclaim kernel/rcu/rcu.h:185 [inline]
 #0:  (rcu_callback){....}, at: [<ffffffff8146ebce>] rcu_do_batch kernel/rcu/tree.c:2699 [inline]
 #0:  (rcu_callback){....}, at: [<ffffffff8146ebce>] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline]
 #0:  (rcu_callback){....}, at: [<ffffffff8146ebce>] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline]
 #0:  (rcu_callback){....}, at: [<ffffffff8146ebce>] rcu_process_callbacks+0x84e/0x1180 kernel/rcu/tree.c:2946

stack backtrace:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.300-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2589
 valid_state kernel/locking/lockdep.c:2602 [inline]
 mark_lock_irq kernel/locking/lockdep.c:2796 [inline]
 mark_lock+0xb4d/0x1050 kernel/locking/lockdep.c:3194
 mark_irqflags kernel/locking/lockdep.c:3072 [inline]
 __lock_acquire+0xc81/0x3f20 kernel/locking/lockdep.c:3448
 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152
 spin_lock include/linux/spinlock.h:317 [inline]
 rxrpc_put_one_client_conn net/rxrpc/conn_client.c:905 [inline]
 rxrpc_put_client_conn+0x661/0xac0 net/rxrpc/conn_client.c:957
 rxrpc_put_connection net/rxrpc/ar-internal.h:862 [inline]
 rxrpc_rcu_destroy_call+0x83/0x190 net/rxrpc/call_object.c:653
 __rcu_reclaim kernel/rcu/rcu.h:195 [inline]
 rcu_do_batch kernel/rcu/tree.c:2699 [inline]
 invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline]
 __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline]
 rcu_process_callbacks+0x780/0x1180 kernel/rcu/tree.c:2946
 __do_softirq+0x24d/0x9ff kernel/softirq.c:288
 invoke_softirq kernel/softirq.c:368 [inline]
 irq_exit+0x193/0x240 kernel/softirq.c:409
 exiting_irq arch/x86/include/asm/apic.h:638 [inline]
 smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1106
 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:796
 </IRQ>

Crashes (15057):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/03 18:08 linux-4.14.y 179ef7fe8677 e080de16 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2022/08/25 01:04 linux-4.14.y b641242202ed 514514f6 .config console log report syz C ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2022/05/16 18:24 linux-4.14.y 690285a9380d 744a39e2 .config console log report syz C ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2022/05/12 01:53 linux-4.14.y e3a56aaade89 beb0b407 .config console log report syz C ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2021/06/11 11:58 linux-4.14.y 3d3abdc8ebd3 1ba81399 .config console log report syz C ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2021/04/26 00:13 linux-4.14.y cf256fbcbe34 2a82f1b3 .config console log report syz C ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2020/12/13 00:18 linux-4.14.y 3f2ecb86cb90 bca53db9 .config console log report syz C ci2-linux-4-14
2020/07/03 14:27 linux-4.14.y b850307b279c 6e569755 .config console log report syz C ci2-linux-4-14
2020/06/01 08:41 linux-4.14.y 4f68020fef1c a0331e89 .config console log report syz C ci2-linux-4-14
2020/05/16 11:13 linux-4.14.y ab9dfda23248 37bccd4e .config console log report syz C ci2-linux-4-14
2020/03/22 21:10 linux-4.14.y 01364dad1d45 78267cec .config console log report syz C ci2-linux-4-14
2020/03/11 04:54 linux-4.14.y 78d697fc93f9 35f53e45 .config console log report syz C ci2-linux-4-14
2020/02/29 03:59 linux-4.14.y 78d697fc93f9 c88c7b75 .config console log report syz C ci2-linux-4-14
2020/02/28 19:11 linux-4.14.y 78d697fc93f9 c88c7b75 .config console log report syz C ci2-linux-4-14
2020/02/28 15:06 linux-4.14.y 98db2bf27b9e c88c7b75 .config console log report syz C ci2-linux-4-14
2020/02/24 13:00 linux-4.14.y 98db2bf27b9e 1253d6f0 .config console log report syz C ci2-linux-4-14
2020/02/24 12:41 linux-4.14.y 98db2bf27b9e 1253d6f0 .config console log report syz C ci2-linux-4-14
2020/02/24 12:20 linux-4.14.y 98db2bf27b9e 1253d6f0 .config console log report syz C ci2-linux-4-14
2020/02/14 22:41 linux-4.14.y 98db2bf27b9e 5d7b90f1 .config console log report syz C ci2-linux-4-14
2023/01/17 07:36 linux-4.14.y c4215ee4771b a63719e7 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/06 08:37 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/02 02:54 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/02 01:14 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/01 23:34 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/01 21:22 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/01 19:53 linux-4.14.y 7878a41b6cc1 ef65e6cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/01 15:18 linux-4.14.y 7878a41b6cc1 ef65e6cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/01 13:42 linux-4.14.y 7878a41b6cc1 ef65e6cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/01 12:09 linux-4.14.y 7878a41b6cc1 ef65e6cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/03/01 08:53 linux-4.14.y 7878a41b6cc1 ef65e6cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/28 04:19 linux-4.14.y 7878a41b6cc1 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/27 23:48 linux-4.14.y 7878a41b6cc1 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/27 21:30 linux-4.14.y 7878a41b6cc1 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/27 16:11 linux-4.14.y 7878a41b6cc1 9189cb53 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/27 12:46 linux-4.14.y 7878a41b6cc1 9189cb53 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/27 11:19 linux-4.14.y 7878a41b6cc1 9189cb53 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/27 10:18 linux-4.14.y 7878a41b6cc1 9189cb53 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/26 02:11 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/26 00:27 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/25 22:29 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/25 20:16 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/25 18:00 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/25 16:30 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/25 14:28 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/25 12:30 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/24 17:52 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/24 15:59 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/24 14:39 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/24 13:27 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/24 10:46 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/23 15:36 linux-4.14.y 1e61bd26fa2c 9e2ebb3c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/23 13:19 linux-4.14.y 1e61bd26fa2c 9e2ebb3c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/23 10:29 linux-4.14.y 1e61bd26fa2c 9e2ebb3c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/23 02:59 linux-4.14.y 1e61bd26fa2c 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/22 20:34 linux-4.14.y 1e61bd26fa2c 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/22 19:00 linux-4.14.y 1e61bd26fa2c 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/22 17:31 linux-4.14.y 1e61bd26fa2c 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/22 14:55 linux-4.14.y 1e61bd26fa2c 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/22 13:37 linux-4.14.y 1e61bd26fa2c 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/22 02:04 linux-4.14.y a8ad60f2af58 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/22 00:58 linux-4.14.y a8ad60f2af58 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/21 23:36 linux-4.14.y a8ad60f2af58 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/21 22:18 linux-4.14.y a8ad60f2af58 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/21 20:57 linux-4.14.y a8ad60f2af58 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/21 19:37 linux-4.14.y a8ad60f2af58 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/21 13:31 linux-4.14.y a8ad60f2af58 f949448d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2023/02/21 11:16 linux-4.14.y a8ad60f2af58 f949448d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 inconsistent lock state in rxrpc_put_client_conn
2021/01/17 12:44 linux-4.14.y f79dc86058bc 813be542 .config console log report info ci2-linux-4-14
2020/02/14 22:05 linux-4.14.y 98db2bf27b9e 5d7b90f1 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.