======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.9.5403/30099 is trying to acquire lock:
ffffffff8e7b6368 (major_names_lock){+.+.}-{3:3}, at: blk_probe_dev block/genhd.c:779 [inline]
ffffffff8e7b6368 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x35/0x290 block/genhd.c:795
but task is already holding lock:
ffff888055ae8360 (&mddev->reconfig_mutex){+.+.}-{3:3}, at: mddev_lock drivers/md/md.h:593 [inline]
ffff888055ae8360 (&mddev->reconfig_mutex){+.+.}-{3:3}, at: md_ioctl+0x72d/0x24e0 drivers/md/md.c:7831
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&mddev->reconfig_mutex){+.+.}-{3:3}:
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747
mddev_lock_nointr drivers/md/md.h:601 [inline]
md_alloc+0x809/0xea0 drivers/md/md.c:5904
md_alloc_and_put+0x1a/0x1b0 drivers/md/md.c:5943
blk_probe_dev block/genhd.c:782 [inline]
blk_request_module+0x272/0x290 block/genhd.c:-1
blkdev_get_no_open+0x37/0xc0 block/bdev.c:724
blkdev_get_by_dev+0x64/0x610 block/bdev.c:782
blkdev_open+0x14e/0x360 block/fops.c:589
do_dentry_open+0x880/0x14b0 fs/open.c:929
do_open fs/namei.c:3695 [inline]
path_openat+0x284f/0x3270 fs/namei.c:3856
do_filp_open+0x1f2/0x430 fs/namei.c:3883
do_sys_openat2+0x134/0x1d0 fs/open.c:1422
do_sys_open fs/open.c:1437 [inline]
__do_sys_openat fs/open.c:1453 [inline]
__se_sys_openat fs/open.c:1448 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1448
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
-> #1 (disks_mutex){+.+.}-{3:3}:
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747
md_alloc+0x41/0xea0 drivers/md/md.c:5844
md_alloc_and_put+0x1a/0x1b0 drivers/md/md.c:5943
blk_probe_dev block/genhd.c:782 [inline]
blk_request_module+0x272/0x290 block/genhd.c:-1
blkdev_get_no_open+0x37/0xc0 block/bdev.c:724
blkdev_get_by_dev+0x64/0x610 block/bdev.c:782
blkdev_open+0x14e/0x360 block/fops.c:589
do_dentry_open+0x880/0x14b0 fs/open.c:929
do_open fs/namei.c:3695 [inline]
path_openat+0x284f/0x3270 fs/namei.c:3856
do_filp_open+0x1f2/0x430 fs/namei.c:3883
do_sys_openat2+0x134/0x1d0 fs/open.c:1422
do_sys_open fs/open.c:1437 [inline]
__do_sys_openat fs/open.c:1453 [inline]
__se_sys_openat fs/open.c:1448 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1448
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
-> #0
(major_names_lock){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3162 [inline]
check_prevs_add kernel/locking/lockdep.c:3281 [inline]
validate_chain kernel/locking/lockdep.c:3897 [inline]
__lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747
blk_probe_dev block/genhd.c:779 [inline]
blk_request_module+0x35/0x290 block/genhd.c:795
blkdev_get_no_open+0x37/0xc0 block/bdev.c:724
blkdev_get_by_dev+0x64/0x610 block/bdev.c:782
md_import_device+0x398/0x7b0 drivers/md/md.c:3841
md_add_new_disk+0x518/0x17b0 drivers/md/md.c:7085
md_ioctl+0x2152/0x24e0 drivers/md/md.c:7927
blkdev_ioctl+0x5b2/0x730 block/ioctl.c:639
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
other info that might help us debug this:
Chain exists of:
major_names_lock --> disks_mutex -->
&mddev->reconfig_mutex
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&mddev->reconfig_mutex
);
lock(
disks_mutex);
lock(&mddev->reconfig_mutex
);
lock(major_names_lock
);
*** DEADLOCK ***
1 lock held by syz.9.5403/30099:
#0: ffff888055ae8360
(&mddev->reconfig_mutex
){+.+.}-{3:3}, at: mddev_lock drivers/md/md.h:593 [inline]
){+.+.}-{3:3}, at: md_ioctl+0x72d/0x24e0 drivers/md/md.c:7831
stack backtrace:
CPU: 1 PID: 30099 Comm: syz.9.5403 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2215
check_prev_add kernel/locking/lockdep.c:3162 [inline]
check_prevs_add kernel/locking/lockdep.c:3281 [inline]
validate_chain kernel/locking/lockdep.c:3897 [inline]
__lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747
blk_probe_dev block/genhd.c:779 [inline]
blk_request_module+0x35/0x290 block/genhd.c:795
blkdev_get_no_open+0x37/0xc0 block/bdev.c:724
blkdev_get_by_dev+0x64/0x610 block/bdev.c:782
md_import_device+0x398/0x7b0 drivers/md/md.c:3841
md_add_new_disk+0x518/0x17b0 drivers/md/md.c:7085
md_ioctl+0x2152/0x24e0 drivers/md/md.c:7927
blkdev_ioctl+0x5b2/0x730 block/ioctl.c:639
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f9bea1a9519
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:00007f9beb056028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f9bea435fa0 RCX: 00007f9bea1a9519
RDX: 0000200000000300 RSI: 0000000040140921 RDI: 0000000000000003
RBP: 00007f9bea239136 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9bea436038 R14: 00007f9bea435fa0 R15: 00007ffda0b674c8
debugfs: creating file 'ram18'
device: 'ram18': device_add
kobject: 'ram18' (ffff8880513b81e8): kobject_add_internal: parent: 'block', set: 'devices'
block ram18: No ACPI support
PM: Adding info for No Bus:ram18
kobject: 'ram18' (ffff8880513b81e8): kobject_uevent_env
kobject: 'ram18' (ffff8880513b81e8): kobject_uevent_env: uevent_suppress caused the event to drop!
kobject: 'holders' (ffff88805ad73600): kobject_add_internal: parent: 'ram18', set: ''
kobject: 'slaves' (ffff88805ad73980): kobject_add_internal: parent: 'ram18', set: ''
kobject: 'queue' (ffff8880328cc500): kobject_add_internal: parent: 'ram18', set: ''
debugfs: creating file 'ram18'
kobject: 'queue' (ffff8880328cc500): kobject_uevent_env
kobject: 'queue' (ffff8880328cc500): kobject_uevent_env: filter function caused the event to drop!
device: '1:18': device_add
kobject: '1:18' (ffff888067d89000): kobject_add_internal: parent: 'bdi', set: 'devices'
bdi 1:18: No ACPI support
PM: Adding info for No Bus:1:18
kobject: '1:18' (ffff888067d89000): kobject_uevent_env
kobject: '1:18' (ffff888067d89000): fill_kobj_path: path = '/devices/virtual/bdi/1:18'
debugfs: creating file '1:18'
debugfs: creating file 'stats'
kobject: 'ram18' (ffff8880513b81e8): kobject_uevent_env
kobject: 'ram18' (ffff8880513b81e8): fill_kobj_path: path = '/devices/virtual/block/ram18'
block device autoloading is deprecated and will be removed.
md: bind
kobject: 'dev-ram18' (ffff888022c86878): kobject_add_internal: parent: 'md', set: ''
kcov: kcov_task_exit: t = ffff88806f668000, kcov->t = ffff88806f668000
ffff88805fdd4000 name hci4 bus 0
hci4: err 0x13
hci4 ffff88805fdd4000
hci4:
hci4: err 0x13
hci4: cancelling interleave scan
hci4 state 0 -> 0
All LE pending actions cleared
hdev hci4
hcon ffff8880657ce000 reason 22
hcon ffff8880657ce000 conn ffff8880792a0000, err 103
hci4 hcon ffff8880657ce000 chan ffff88805fe2cb00
hci4 hcon ffff8880657ce000 handle 200
hci4: hcon ffff8880657ce000
hcon ffff8880657ce000
hci4: conn ffff8880657ce000
device: 'hci4:200': device_unregister
kernfs runtime_status: removing
kernfs control: removing
kernfs runtime_suspended_time: removing
kernfs runtime_active_time: removing
kernfs autosuspend_delay_ms: removing
kernfs power: removing
kernfs device: removing
kernfs subsystem: removing
kernfs hci4:200: removing
kernfs uevent: removing
PM: Removing info for No Bus:hci4:200
kobject: 'hci4:200' (ffff8880657ce5f0): kobject_uevent_env
kobject: 'hci4:200' (ffff8880657ce5f0): fill_kobj_path: path = '/devices/virtual/bluetooth/hci4/hci4:200'
kernfs hci4:200: removing
kobject: 'hci4:200' (ffff8880657ce5f0): kobject_cleanup, parent 0000000000000000
kobject: 'hci4:200' (ffff8880657ce5f0): calling ktype release
kobject: 'hci4:200': free name
hci4 orig refcnt 11
hcon ffff888069ece000 reason 22
hcon ffff888069ece000 conn ffff8880792a6000, err 103
hci4 hcon ffff888069ece000 chan ffff88805fe2ce00
hci4 hcon ffff888069ece000 handle 201
hci4: hcon ffff888069ece000
hcon ffff888069ece000
hci4: conn ffff888069ece000
device: 'hci4:201': device_unregister
kernfs runtime_status: removing
kernfs control: removing
kernfs runtime_suspended_time: removing
kernfs runtime_active_time: removing
kernfs autosuspend_delay_ms: removing
kernfs power: removing
kernfs device: removing
kernfs subsystem: removing
kernfs hci4:201: removing
kernfs uevent: removing
PM: Removing info for No Bus:hci4:201
kobject: 'hci4:201' (ffff888069ece5f0): kobject_uevent_env
kobject: 'hci4:201' (ffff888069ece5f0): fill_kobj_path: path = '/devices/virtual/bluetooth/hci4/hci4:201'
kernfs hci4:201: removing
kobject: 'hci4:201' (ffff888069ece5f0): kobject_cleanup, parent 0000000000000000
kobject: 'hci4:201' (ffff888069ece5f0): calling ktype release
kobject: 'hci4:201': free name
hci4 orig refcnt 7
hdev hci4 event 4
hdev 0000000000000000 len 8
hci4: Cleanup of MSFT extension
hdev hci4 event 8
hci4 orig refcnt 6
channel 3 len 6
channel 3 len 8
hdev hci4 event 2
hdev 0000000000000000 len 8
kernfs runtime_status: removing
kernfs control: removing
kernfs runtime_suspended_time: removing
kernfs runtime_active_time: removing
kernfs autosuspend_delay_ms: removing
kernfs power: removing
kernfs device: removing
kernfs subsystem: removing
kernfs rfkill139: removing
kernfs uevent: removing
kernfs name: removing
kernfs type: removing
kernfs index: removing
kernfs persistent: removing
kernfs state: removing
kernfs soft: removing
kernfs hard: removing
kernfs hard_block_reasons: removing
PM: Removing info for No Bus:rfkill139
kobject: 'rfkill139' (ffff88806ade1110): kobject_uevent_env
kobject: 'rfkill139' (ffff88806ade1110): fill_kobj_path: path = '/devices/virtual/bluetooth/hci4/rfkill139'
kernfs rfkill139: removing
kobject: 'rfkill139' (ffff88806ade1110): kobject_cleanup, parent 0000000000000000
kobject: 'rfkill139' (ffff88806ade1110): calling ktype release
kobject: 'rfkill139': free name
kernfs runtime_status: removing
kernfs control: removing
kernfs runtime_suspended_time: removing
kernfs runtime_active_time: removing
kernfs autosuspend_delay_ms: removing
kernfs power: removing
kernfs subsystem: removing
kernfs hci4: removing
kernfs uevent: removing
PM: Removing info for No Bus:hci4
kobject: 'hci4' (ffff88805fdd5520): kobject_uevent_env
kobject: 'hci4' (ffff88805fdd5520): fill_kobj_path: path = '/devices/virtual/bluetooth/hci4'
kernfs hci4: removing
hci4 orig refcnt 2
kobject: 'hci4' (ffff88805fdd5520): kobject_cleanup, parent 0000000000000000
kobject: 'hci4' (ffff88805fdd5520): calling ktype release
All LE connection parameters were removed
hci4: Unregister MSFT extension
kobject: 'hci4': free name
syz_tun: bond_netdev_event received NETDEV_GOING_DOWN
net syz_tun: siw: event 10
In tnode_resize ffff88801d296a20 inflate_threshold=50 threshold=25
In tnode_resize ffff8880319a2020 inflate_threshold=50 threshold=25
In tnode_resize ffff88805e01b820 inflate_threshold=50 threshold=25
In tnode_resize ffff88805f8c5c20 inflate_threshold=50 threshold=25
In tnode_resize ffff8880684e0120 inflate_threshold=50 threshold=25
In tnode_resize ffff888058594da0 inflate_threshold=50 threshold=25
trie_flush found=1
In tnode_resize ffff88801d296a20 inflate_threshold=50 threshold=25
In tnode_resize ffff8880319a2020 inflate_threshold=50 threshold=25
In tnode_resize ffff88805e01b820 inflate_threshold=50 threshold=25
In tnode_resize ffff88805f8c5c20 inflate_threshold=50 threshold=25
In tnode_resize ffff8880684e0120 inflate_threshold=50 threshold=25
In tnode_resize ffff888058594da0 inflate_threshold=50 threshold=25
trie_flush found=1
syz_tun: bond_netdev_event received NETDEV_DOWN
net syz_tun: siw: event 2
sctp: sctp_addr_wq_mgmt: add new entry for cmd:2, addr:fe80::a8aa:aaff:feaa:aaaa in wq:ffff88807a122dd8
sctp: sctp_addr_wq_mgmt: add new entry for cmd:2, addr:fe80::aa in wq:ffff88807a122dd8
Deleting ac141400/24 dsfield=0x00 t=ffff888024d09030
Deleting ac1414ff/32 dsfield=0x00 t=ffff888024d09030
Deleting ac1414aa/32 dsfield=0x00 t=ffff888024d09030
In tnode_resize ffff88805f8c5c20 inflate_threshold=50 threshold=25
In tnode_resize ffff888058594da0 inflate_threshold=50 threshold=25
sctp: sctp_addr_wq_mgmt: add new entry for cmd:2, addr:172.20.20.170 in wq:ffff88807a122dd8
syz_tun (unregistering): bond_netdev_event received NETDEV_UNREGISTER
net syz_tun: siw: event 6
syz_tun (unregistering): bond_netdev_event received NETDEV_PRE_UNINIT
net syz_tun: siw: event 18