BUG: using smp_processor_id() in preemptible [00000000] code: syz-executor.2/20034 caller is tipc_aead_tfm_next net/tipc/crypto.c:402 [inline] caller is tipc_aead_encrypt net/tipc/crypto.c:639 [inline] caller is tipc_crypto_xmit+0x80a/0x2790 net/tipc/crypto.c:1607 CPU: 0 PID: 20034 Comm: syz-executor.2 Not tainted 5.9.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 check_preemption_disabled+0x128/0x130 lib/smp_processor_id.c:48 tipc_aead_tfm_next net/tipc/crypto.c:402 [inline] tipc_aead_encrypt net/tipc/crypto.c:639 [inline] tipc_crypto_xmit+0x80a/0x2790 net/tipc/crypto.c:1607 tipc_bearer_xmit_skb+0x180/0x3f0 net/tipc/bearer.c:523 tipc_enable_bearer+0xb1d/0xdc0 net/tipc/bearer.c:331 __tipc_nl_bearer_enable+0x2bf/0x390 net/tipc/bearer.c:995 __tipc_nl_compat_doit net/tipc/netlink_compat.c:371 [inline] tipc_nl_compat_doit+0x440/0x640 net/tipc/netlink_compat.c:393 tipc_nl_compat_handle net/tipc/netlink_compat.c:1278 [inline] tipc_nl_compat_recv+0x4ef/0xb40 net/tipc/netlink_compat.c:1321 genl_family_rcv_msg_doit net/netlink/genetlink.c:669 [inline] genl_family_rcv_msg net/netlink/genetlink.c:714 [inline] genl_rcv_msg+0x61d/0x980 net/netlink/genetlink.c:731 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 genl_rcv+0x24/0x40 net/netlink/genetlink.c:742 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d5b9 Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2fff0fbc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000002c000 RCX: 000000000045d5b9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 000000000118d0c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118d08c R13: 00007ffe55c923bf R14: 00007f2fff0fc9c0 R15: 000000000118d08c ================================ WARNING: inconsistent lock state 5.9.0-rc1-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.2/20034 [HC0[0]:SC0[0]:HE1:SE1] takes: ffffffff89c54eb8 (padata_works_lock){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffffffff89c54eb8 (padata_works_lock){+.?.}-{2:2}, at: padata_do_parallel+0x4d7/0x860 kernel/padata.c:220 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x1f1/0xad0 kernel/locking/lockdep.c:5005 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] padata_do_parallel+0x4d7/0x860 kernel/padata.c:220 pcrypt_aead_encrypt+0x39f/0x4d0 crypto/pcrypt.c:115 crypto_aead_encrypt+0xaa/0xf0 crypto/aead.c:94 tipc_aead_encrypt net/tipc/crypto.c:736 [inline] tipc_crypto_xmit+0x1868/0x2790 net/tipc/crypto.c:1607 tipc_bearer_xmit_skb+0x180/0x3f0 net/tipc/bearer.c:523 tipc_disc_timeout+0x84b/0xc90 net/tipc/discover.c:334 call_timer_fn+0x1ac/0x760 kernel/time/timer.c:1413 expire_timers kernel/time/timer.c:1458 [inline] __run_timers.part.0+0x67c/0xaa0 kernel/time/timer.c:1755 __run_timers kernel/time/timer.c:1736 [inline] run_timer_softirq+0xae/0x1a0 kernel/time/timer.c:1768 __do_softirq+0x2de/0xa24 kernel/softirq.c:298 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] do_softirq_own_stack+0x9d/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x1f3/0x230 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x51/0xf0 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581 arch_local_irq_restore+0x4a/0x51 arch/x86/include/asm/paravirt.h:770 dump_stack+0x1f6/0x20d lib/dump_stack.c:123 check_preemption_disabled+0x128/0x130 lib/smp_processor_id.c:48 tipc_aead_tfm_next net/tipc/crypto.c:402 [inline] tipc_aead_encrypt net/tipc/crypto.c:639 [inline] tipc_crypto_xmit+0x80a/0x2790 net/tipc/crypto.c:1607 tipc_bearer_xmit_skb+0x180/0x3f0 net/tipc/bearer.c:523 tipc_enable_bearer+0xb1d/0xdc0 net/tipc/bearer.c:331 __tipc_nl_bearer_enable+0x2bf/0x390 net/tipc/bearer.c:995 __tipc_nl_compat_doit net/tipc/netlink_compat.c:371 [inline] tipc_nl_compat_doit+0x440/0x640 net/tipc/netlink_compat.c:393 tipc_nl_compat_handle net/tipc/netlink_compat.c:1278 [inline] tipc_nl_compat_recv+0x4ef/0xb40 net/tipc/netlink_compat.c:1321 genl_family_rcv_msg_doit net/netlink/genetlink.c:669 [inline] genl_family_rcv_msg net/netlink/genetlink.c:714 [inline] genl_rcv_msg+0x61d/0x980 net/netlink/genetlink.c:731 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 genl_rcv+0x24/0x40 net/netlink/genetlink.c:742 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 irq event stamp: 4005 hardirqs last enabled at (4005): [] __local_bh_enable_ip+0xd1/0x190 kernel/softirq.c:200 hardirqs last disabled at (4003): [] __local_bh_enable_ip+0x99/0x190 kernel/softirq.c:177 softirqs last enabled at (4004): [] rcu_read_unlock_bh include/linux/rcupdate.h:719 [inline] softirqs last enabled at (4004): [] padata_do_parallel+0x49d/0x860 kernel/padata.c:218 softirqs last disabled at (4002): [] padata_do_parallel+0x37/0x860 kernel/padata.c:183 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(padata_works_lock); lock(padata_works_lock); *** DEADLOCK *** 4 locks held by syz-executor.2/20034: #0: ffffffff8a846350 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:741 #1: ffffffff8a846408 (genl_mutex){+.+.}-{3:3}, at: genl_lock net/netlink/genetlink.c:33 [inline] #1: ffffffff8a846408 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg+0x732/0x980 net/netlink/genetlink.c:729 #2: ffffffff8a7e8488 (rtnl_mutex){+.+.}-{3:3}, at: __tipc_nl_compat_doit net/tipc/netlink_compat.c:358 [inline] #2: ffffffff8a7e8488 (rtnl_mutex){+.+.}-{3:3}, at: tipc_nl_compat_doit+0x293/0x640 net/tipc/netlink_compat.c:393 #3: ffffffff89bd6900 (rcu_read_lock){....}-{1:2}, at: buf_msg net/tipc/msg.h:198 [inline] #3: ffffffff89bd6900 (rcu_read_lock){....}-{1:2}, at: tipc_bearer_xmit_skb+0x8c/0x3f0 net/tipc/bearer.c:516 stack backtrace: CPU: 0 PID: 20034 Comm: syz-executor.2 Not tainted 5.9.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_usage_bug kernel/locking/lockdep.c:4020 [inline] valid_state kernel/locking/lockdep.c:3361 [inline] mark_lock_irq kernel/locking/lockdep.c:3560 [inline] mark_lock.cold+0x7a/0x7f kernel/locking/lockdep.c:4006 mark_usage kernel/locking/lockdep.c:3923 [inline] __lock_acquire+0x8cd/0x5640 kernel/locking/lockdep.c:4380 lock_acquire+0x1f1/0xad0 kernel/locking/lockdep.c:5005 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] padata_do_parallel+0x4d7/0x860 kernel/padata.c:220 pcrypt_aead_encrypt+0x39f/0x4d0 crypto/pcrypt.c:115 crypto_aead_encrypt+0xaa/0xf0 crypto/aead.c:94 tipc_aead_encrypt net/tipc/crypto.c:736 [inline] tipc_crypto_xmit+0x1868/0x2790 net/tipc/crypto.c:1607 tipc_bearer_xmit_skb+0x180/0x3f0 net/tipc/bearer.c:523 tipc_enable_bearer+0xb1d/0xdc0 net/tipc/bearer.c:331 __tipc_nl_bearer_enable+0x2bf/0x390 net/tipc/bearer.c:995 __tipc_nl_compat_doit net/tipc/netlink_compat.c:371 [inline] tipc_nl_compat_doit+0x440/0x640 net/tipc/netlink_compat.c:393 tipc_nl_compat_handle net/tipc/netlink_compat.c:1278 [inline] tipc_nl_compat_recv+0x4ef/0xb40 net/tipc/netlink_compat.c:1321 genl_family_rcv_msg_doit net/netlink/genetlink.c:669 [inline] genl_family_rcv_msg net/netlink/genetlink.c:714 [inline] genl_rcv_msg+0x61d/0x980 net/netlink/genetlink.c:731 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 genl_rcv+0x24/0x40 net/netlink/genetlink.c:742 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d5b9 Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2fff0fbc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000002c000 RCX: 000000000045d5b9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 000000000118d0c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118d08c R13: 00007ffe55c923bf R14: 00007f2fff0fc9c0 R15: 000000000118d08c tipc: Enabled bearer , priority 10