1
======================================================
WARNING: possible circular locking dependency detected
6.14.0 #1 Not tainted
------------------------------------------------------
syz.8.3311/16553 is trying to acquire lock:
loop2: detected capacity change from 0 to 4096
ffff888109419548 ((work_completion)(&adapter->reset_task)){+.+.}-{0:0}, at: touch_work_lockdep_map kernel/workqueue.c:3922 [inline]
ffff888109419548 ((work_completion)(&adapter->reset_task)){+.+.}-{0:0}, at: start_flush_work kernel/workqueue.c:4176 [inline]
ffff888109419548 ((work_completion)(&adapter->reset_task)){+.+.}-{0:0}, at: __flush_work+0x459/0xc90 kernel/workqueue.c:4208
SELinux: security_context_str_to_sid (user_u) failed with errno=-22

but task is already holding lock:
ffffffffad20ec28 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
ffffffffad20ec28 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:335 [inline]
ffffffffad20ec28 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_setlink+0x32e/0x6f0 net/core/rtnetlink.c:3420

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (rtnl_mutex){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:585 [inline]
       __mutex_lock+0x16c/0x1dd0 kernel/locking/mutex.c:730
       e1000_reset_task+0x55/0xb0 drivers/net/ethernet/intel/e1000/e1000_main.c:3512
       process_one_work kernel/workqueue.c:3238 [inline]
       process_scheduled_works+0x55a/0x1980 kernel/workqueue.c:3319
       worker_thread+0x59f/0xcf0 kernel/workqueue.c:3400
       kthread+0x422/0x840 kernel/kthread.c:464
       ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:148
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

-> #0 ((work_completion)(&adapter->reset_task)){+.+.}-{0:0}:
       check_prev_add kernel/locking/lockdep.c:3163 [inline]
       check_prevs_add kernel/locking/lockdep.c:3282 [inline]
       validate_chain kernel/locking/lockdep.c:3906 [inline]
       __lock_acquire+0x28b7/0x4650 kernel/locking/lockdep.c:5228
       lock_acquire kernel/locking/lockdep.c:5851 [inline]
       lock_acquire+0x19b/0x4c0 kernel/locking/lockdep.c:5816
       touch_work_lockdep_map kernel/workqueue.c:3922 [inline]
       start_flush_work kernel/workqueue.c:4176 [inline]
       __flush_work+0x46d/0xc90 kernel/workqueue.c:4208
       __cancel_work_sync+0x10c/0x130 kernel/workqueue.c:4364
       e1000_down_and_stop+0xa1/0xc0 drivers/net/ethernet/intel/e1000/e1000_main.c:483
       e1000_down+0x3a1/0x6f0 drivers/net/ethernet/intel/e1000/e1000_main.c:526
       e1000_close+0xc5/0x4d0 drivers/net/ethernet/intel/e1000/e1000_main.c:1448
       __dev_close_many+0x1c7/0x350 net/core/dev.c:1719
       __dev_close net/core/dev.c:1731 [inline]
       __dev_change_flags+0x226/0x5e0 net/core/dev.c:9255
       dev_change_flags+0x8e/0x170 net/core/dev.c:9329
       do_setlink.isra.0+0x9f2/0x3d60 net/core/rtnetlink.c:3118
       rtnl_setlink+0x3fd/0x6f0 net/core/rtnetlink.c:3430
       rtnetlink_rcv_msg+0x9c8/0xfc0 net/core/rtnetlink.c:6912
       netlink_rcv_skb+0x15d/0x450 net/netlink/af_netlink.c:2533
       netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
       netlink_unicast+0x547/0x760 net/netlink/af_netlink.c:1338
       netlink_sendmsg+0x8a2/0xd80 net/netlink/af_netlink.c:1882
       sock_sendmsg_nosec net/socket.c:718 [inline]
       __sock_sendmsg+0x224/0x2a0 net/socket.c:733
       ____sys_sendmsg+0x76f/0xa60 net/socket.c:2573
       ___sys_sendmsg+0x11d/0x1c0 net/socket.c:2627
       __sys_sendmsg+0x151/0x200 net/socket.c:2659
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xc3/0x1d0 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(rtnl_mutex);
                               lock((work_completion)(&adapter->reset_task));
                               lock(rtnl_mutex);
  lock((work_completion)(&adapter->reset_task));

 *** DEADLOCK ***

2 locks held by syz.8.3311/16553:
 #0: ffffffffad20ec28 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
 #0: ffffffffad20ec28 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:335 [inline]
 #0: ffffffffad20ec28 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_setlink+0x32e/0x6f0 net/core/rtnetlink.c:3420
 #1: ffffffffacc18a80 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #1: ffffffffacc18a80 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #1: ffffffffacc18a80 (rcu_read_lock){....}-{1:3}, at: start_flush_work kernel/workqueue.c:4150 [inline]
 #1: ffffffffacc18a80 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xe4/0xc90 kernel/workqueue.c:4208

stack backtrace:
CPU: 4 UID: 0 PID: 16553 Comm: syz.8.3311 Not tainted 6.14.0 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0xca/0x120 lib/dump_stack.c:120
 print_circular_bug.isra.0+0x5ad/0x9b0 kernel/locking/lockdep.c:2076
 check_noncircular+0x2f3/0x3d0 kernel/locking/lockdep.c:2208
 check_prev_add kernel/locking/lockdep.c:3163 [inline]
 check_prevs_add kernel/locking/lockdep.c:3282 [inline]
 validate_chain kernel/locking/lockdep.c:3906 [inline]
 __lock_acquire+0x28b7/0x4650 kernel/locking/lockdep.c:5228
 lock_acquire kernel/locking/lockdep.c:5851 [inline]
 lock_acquire+0x19b/0x4c0 kernel/locking/lockdep.c:5816
 touch_work_lockdep_map kernel/workqueue.c:3922 [inline]
 start_flush_work kernel/workqueue.c:4176 [inline]
 __flush_work+0x46d/0xc90 kernel/workqueue.c:4208
 __cancel_work_sync+0x10c/0x130 kernel/workqueue.c:4364
 e1000_down_and_stop+0xa1/0xc0 drivers/net/ethernet/intel/e1000/e1000_main.c:483
 e1000_down+0x3a1/0x6f0 drivers/net/ethernet/intel/e1000/e1000_main.c:526
 e1000_close+0xc5/0x4d0 drivers/net/ethernet/intel/e1000/e1000_main.c:1448
 __dev_close_many+0x1c7/0x350 net/core/dev.c:1719
 __dev_close net/core/dev.c:1731 [inline]
 __dev_change_flags+0x226/0x5e0 net/core/dev.c:9255
 dev_change_flags+0x8e/0x170 net/core/dev.c:9329
 do_setlink.isra.0+0x9f2/0x3d60 net/core/rtnetlink.c:3118
 rtnl_setlink+0x3fd/0x6f0 net/core/rtnetlink.c:3430
 rtnetlink_rcv_msg+0x9c8/0xfc0 net/core/rtnetlink.c:6912
 netlink_rcv_skb+0x15d/0x450 net/netlink/af_netlink.c:2533
 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
 netlink_unicast+0x547/0x760 net/netlink/af_netlink.c:1338
 netlink_sendmsg+0x8a2/0xd80 net/netlink/af_netlink.c:1882
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg+0x224/0x2a0 net/socket.c:733
 ____sys_sendmsg+0x76f/0xa60 net/socket.c:2573
 ___sys_sendmsg+0x11d/0x1c0 net/socket.c:2627
 __sys_sendmsg+0x151/0x200 net/socket.c:2659
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc3/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f434d8347ed
Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f434be55fc8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f434da76080 RCX: 00007f434d8347ed
RDX: 0000000000008000 RSI: 0000200000003c00 RDI: 0000000000000007
RBP: 00007f434d8cdb38 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f434da7608c R14: 00007f434da76118 R15: 00007f434be36000
 </TASK>

For immediate assistance, please email our customer support: [email protected]

Download RAW File