====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz-executor/18266 is trying to acquire lock: ffffffff901dafa0 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:316 [inline] ffffffff901dafa0 (fs_reclaim){+.+.}-{0:0}, at: slab_pre_alloc_hook mm/slub.c:4673 [inline] ffffffff901dafa0 (fs_reclaim){+.+.}-{0:0}, at: slab_alloc_node mm/slub.c:5011 [inline] ffffffff901dafa0 (fs_reclaim){+.+.}-{0:0}, at: __kmalloc_cache_noprof+0x63/0x6d0 mm/slub.c:5676 but task is already holding lock: ffff88807d54c530 (&idev->mc_lock){+.+.}-{4:4}, at: __ipv6_dev_mc_inc+0x53/0xc80 net/ipv6/mcast.c:963 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #7 (&idev->mc_lock){+.+.}-{4:4}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19f/0x1c10 kernel/locking/mutex.c:821 __ipv6_dev_mc_inc+0x53/0xc80 net/ipv6/mcast.c:963 __ipv6_sock_mc_join+0x5b8/0x9c0 net/ipv6/mcast.c:234 ipv6_mcast_join_leave+0x1f9/0x220 net/ipv6/ipv6_sockglue.c:277 do_ipv6_setsockopt+0x26ad/0x3b00 net/ipv6/ipv6_sockglue.c:819 ipv6_setsockopt+0xcb/0x170 net/ipv6/ipv6_sockglue.c:880 udpv6_setsockopt+0x64/0xb0 net/ipv6/udp.c:1837 do_sock_setsockopt+0xf3/0x1d0 net/socket.c:2399 __sys_setsockopt+0x195/0x220 net/socket.c:2424 __do_sys_setsockopt net/socket.c:2430 [inline] __se_sys_setsockopt net/socket.c:2427 [inline] __x64_sys_setsockopt+0xbd/0x160 net/socket.c:2427 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #6 (sk_lock-AF_INET6){+.+.}-{0:0}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 lock_sock_nested+0x41/0xf0 net/core/sock.c:3906 lock_sock include/net/sock.h:1717 [inline] inet_shutdown+0x67/0x410 net/ipv4/af_inet.c:913 nbd_mark_nsock_dead+0xae/0x5c0 drivers/block/nbd.c:319 sock_shutdown+0x16b/0x200 drivers/block/nbd.c:420 nbd_clear_sock drivers/block/nbd.c:1464 [inline] nbd_config_put+0x3d5/0x9b0 drivers/block/nbd.c:1493 nbd_genl_connect+0xd72/0x1770 drivers/block/nbd.c:2320 genl_family_rcv_msg_doit+0x214/0x300 net/netlink/genetlink.c:1114 genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline] genl_rcv_msg+0x560/0x800 net/netlink/genetlink.c:1209 netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2585 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218 netlink_unicast_kernel net/netlink/af_netlink.c:1336 [inline] netlink_unicast+0x668/0x950 net/netlink/af_netlink.c:1362 netlink_sendmsg+0x9ac/0x10c0 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:800 [inline] __sock_sendmsg net/socket.c:818 [inline] ____sys_sendmsg+0xa13/0xb90 net/socket.c:2713 ___sys_sendmsg+0x208/0x270 net/socket.c:2770 __sys_sendmsg+0x160/0x210 net/socket.c:2802 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #5 (&nsock->tx_lock){+.+.}-{4:4}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19f/0x1c10 kernel/locking/mutex.c:821 nbd_handle_cmd drivers/block/nbd.c:1143 [inline] nbd_queue_rq+0x42d/0xfa0 drivers/block/nbd.c:1207 blk_mq_dispatch_rq_list+0x428/0x1e60 block/blk-mq.c:2141 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:168 [inline] blk_mq_do_dispatch_sched block/blk-mq-sched.c:182 [inline] __blk_mq_sched_dispatch_requests+0xcea/0x1620 block/blk-mq-sched.c:307 blk_mq_sched_dispatch_requests+0xd7/0x1c0 block/blk-mq-sched.c:329 blk_mq_run_work_fn+0x130/0x380 block/blk-mq.c:2555 process_one_work+0xaeb/0x1b40 kernel/workqueue.c:3497 process_scheduled_works kernel/workqueue.c:3580 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3661 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #4 (&cmd->lock){+.+.}-{4:4}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19f/0x1c10 kernel/locking/mutex.c:821 nbd_queue_rq+0xba/0xfa0 drivers/block/nbd.c:1199 blk_mq_dispatch_rq_list+0x428/0x1e60 block/blk-mq.c:2141 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:168 [inline] blk_mq_do_dispatch_sched block/blk-mq-sched.c:182 [inline] __blk_mq_sched_dispatch_requests+0xcea/0x1620 block/blk-mq-sched.c:307 blk_mq_sched_dispatch_requests+0xd7/0x1c0 block/blk-mq-sched.c:329 blk_mq_run_work_fn+0x130/0x380 block/blk-mq.c:2555 process_one_work+0xaeb/0x1b40 kernel/workqueue.c:3497 process_scheduled_works kernel/workqueue.c:3580 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3661 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #3 (set->srcu){.+.+}-{0:0}: lock_sync kernel/locking/lockdep.c:5991 [inline] lock_sync+0xb5/0x120 kernel/locking/lockdep.c:5979 srcu_lock_sync include/linux/srcu.h:261 [inline] __synchronize_srcu+0xa2/0x310 kernel/rcu/srcutree.c:1662 blk_mq_wait_quiesce_done block/blk-mq.c:284 [inline] blk_mq_wait_quiesce_done block/blk-mq.c:281 [inline] blk_mq_quiesce_queue block/blk-mq.c:304 [inline] blk_mq_quiesce_queue+0x149/0x1c0 block/blk-mq.c:299 elevator_switch+0x17b/0x7e0 block/elevator.c:576 elevator_change+0x352/0x530 block/elevator.c:681 elevator_set_default+0x29e/0x360 block/elevator.c:754 blk_register_queue+0x49e/0x640 block/blk-sysfs.c:992 __add_disk+0x7dd/0xf10 block/genhd.c:531 add_disk_fwnode+0x118/0x480 block/genhd.c:600 add_disk include/linux/blkdev.h:799 [inline] nbd_dev_add+0x779/0xb10 drivers/block/nbd.c:2027 nbd_init+0x2c5/0x2e0 drivers/block/nbd.c:2744 do_one_initcall+0x11c/0x6f0 init/main.c:1432 do_initcall_level init/main.c:1494 [inline] do_initcalls init/main.c:1510 [inline] do_basic_setup init/main.c:1530 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1745 kernel_init+0x21/0x1e0 init/main.c:1635 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #2 (&q->elevator_lock){+.+.}-{4:4}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19f/0x1c10 kernel/locking/mutex.c:821 elevator_change+0x1bc/0x530 block/elevator.c:679 elv_iosched_store+0x38e/0x440 block/elevator.c:831 queue_attr_store+0x25f/0x2f0 block/blk-sysfs.c:906 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 iter_file_splice_write+0x836/0x1190 fs/splice.c:660 do_splice_from fs/splice.c:863 [inline] direct_splice_actor+0x192/0x690 fs/splice.c:1114 splice_direct_to_actor+0x341/0xa30 fs/splice.c:1023 do_splice_direct_actor fs/splice.c:1157 [inline] do_splice_direct+0x174/0x240 fs/splice.c:1183 do_sendfile+0xadc/0xe20 fs/read_write.c:1351 __do_sys_sendfile64 fs/read_write.c:1406 [inline] __se_sys_sendfile64 fs/read_write.c:1398 [inline] __x64_sys_sendfile64+0x154/0x220 fs/read_write.c:1398 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&q->q_usage_counter(io)#17){++++}-{0:0}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 blk_alloc_queue+0x610/0x790 block/blk-core.c:503 blk_mq_alloc_queue+0x174/0x290 block/blk-mq.c:4471 __blk_mq_alloc_disk+0x29/0x120 block/blk-mq.c:4518 loop_add+0x498/0xb60 drivers/block/loop.c:1971 loop_init+0x1d3/0x200 drivers/block/loop.c:2210 do_one_initcall+0x11c/0x6f0 init/main.c:1432 do_initcall_level init/main.c:1494 [inline] do_initcalls init/main.c:1510 [inline] do_basic_setup init/main.c:1530 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1745 kernel_init+0x21/0x1e0 init/main.c:1635 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #0 (fs_reclaim){+.+.}-{0:0}: check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3209 check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x1528/0x1f40 kernel/locking/lockdep.c:5288 lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __fs_reclaim_acquire mm/page_alloc.c:4388 [inline] fs_reclaim_acquire+0xc4/0x100 mm/page_alloc.c:4402 might_alloc include/linux/sched/mm.h:316 [inline] slab_pre_alloc_hook mm/slub.c:4673 [inline] slab_alloc_node mm/slub.c:5011 [inline] __kmalloc_cache_noprof+0x63/0x6d0 mm/slub.c:5676 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] mca_alloc net/ipv6/mcast.c:890 [inline] __ipv6_dev_mc_inc+0x2f1/0xc80 net/ipv6/mcast.c:981 ipv6_add_dev+0xbfb/0x15c0 net/ipv6/addrconf.c:475 addrconf_notify+0x5db/0x1ba0 net/ipv6/addrconf.c:3704 notifier_call_chain+0x99/0x3f0 kernel/notifier.c:86 call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2313 call_netdevice_notifiers_extack net/core/dev.c:2351 [inline] call_netdevice_notifiers net/core/dev.c:2365 [inline] register_netdevice+0x16f5/0x26b0 net/core/dev.c:11782 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1080 [inline] nsim_create+0xba6/0x12f0 drivers/net/netdevsim/netdev.c:1162 __nsim_dev_port_add+0x3ba/0x8f0 drivers/net/netdevsim/dev.c:1433 nsim_dev_port_add_all drivers/net/netdevsim/dev.c:1494 [inline] nsim_drv_probe+0xd72/0x1350 drivers/net/netdevsim/dev.c:1655 call_driver_probe drivers/base/dd.c:629 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:707 __driver_probe_device+0x210/0x460 drivers/base/dd.c:869 driver_probe_device+0x4a/0x140 drivers/base/dd.c:899 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1027 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4c0 drivers/base/dd.c:1131 device_initial_probe+0xaf/0xf0 drivers/base/dd.c:1190 __bus_probe_device+0x60/0x160 drivers/base/bus.c:614 device_add+0x121d/0x1970 drivers/base/core.c:3778 nsim_bus_dev_new drivers/net/netdevsim/bus.c:468 [inline] new_device_store+0x44d/0x6d0 drivers/net/netdevsim/bus.c:191 bus_attr_store+0x74/0xb0 drivers/base/bus.c:172 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:575 [inline] vfs_write+0x6af/0x1040 fs/read_write.c:667 ksys_write+0x12a/0x250 fs/read_write.c:719 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: fs_reclaim --> sk_lock-AF_INET6 --> &idev->mc_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&idev->mc_lock); lock(sk_lock-AF_INET6); lock(&idev->mc_lock); lock(fs_reclaim); *** DEADLOCK *** locks held by syz-executor/18266: 9, on CPU#0: #0: ffff88807fe52478 (sb_writers#7){.+.+}-{0:0}, at: ksys_write+0x12a/0x250 fs/read_write.c:719 #1: ffff888053628c80 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x2c2/0x5f0 fs/kernfs/file.c:336 #2: ffff88802b744a58 (kn->active#52){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:73 [inline] #2: ffff88802b744a58 (kn->active#52){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x332/0x5f0 fs/kernfs/file.c:337 #3: ffffffff91479b80 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0xfe/0x6d0 drivers/net/netdevsim/bus.c:184 #4: ffff88801ff14128 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1109 [inline] #4: ffff88801ff14128 (&dev->mutex){....}-{4:4}, at: __device_attach+0x7e/0x4c0 drivers/base/dd.c:1106 #5: ffff888068f05258 (&devlink->lock_key#21){+.+.}-{4:4}, at: nsim_drv_probe+0xcd/0x1350 drivers/net/netdevsim/dev.c:1582 #6: ffffffff91f3b9a0 (rtnl_mutex){+.+.}-{4:4}, at: nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1068 [inline] #6: ffffffff91f3b9a0 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x8b5/0x12f0 drivers/net/netdevsim/netdev.c:1162 #7: ffff8880777ace98 (&dev->lock){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2885 [inline] #7: ffff8880777ace98 (&dev->lock){+.+.}-{4:4}, at: netdev_lock_ops include/net/netdev_lock.h:42 [inline] #7: ffff8880777ace98 (&dev->lock){+.+.}-{4:4}, at: netdev_lock_ops include/net/netdev_lock.h:39 [inline] #7: ffff8880777ace98 (&dev->lock){+.+.}-{4:4}, at: register_netdevice+0x16d5/0x26b0 net/core/dev.c:11781 #8: ffff88807d54c530 (&idev->mc_lock){+.+.}-{4:4}, at: __ipv6_dev_mc_inc+0x53/0xc80 net/ipv6/mcast.c:963 stack backtrace: CPU: 0 UID: 0 PID: 18266 Comm: syz-executor Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_circular_bug.cold+0x178/0x1be kernel/locking/lockdep.c:2087 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2219 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3209 check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x1528/0x1f40 kernel/locking/lockdep.c:5288 lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __fs_reclaim_acquire mm/page_alloc.c:4388 [inline] fs_reclaim_acquire+0xc4/0x100 mm/page_alloc.c:4402 might_alloc include/linux/sched/mm.h:316 [inline] slab_pre_alloc_hook mm/slub.c:4673 [inline] slab_alloc_node mm/slub.c:5011 [inline] __kmalloc_cache_noprof+0x63/0x6d0 mm/slub.c:5676 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] mca_alloc net/ipv6/mcast.c:890 [inline] __ipv6_dev_mc_inc+0x2f1/0xc80 net/ipv6/mcast.c:981 ipv6_add_dev+0xbfb/0x15c0 net/ipv6/addrconf.c:475 addrconf_notify+0x5db/0x1ba0 net/ipv6/addrconf.c:3704 notifier_call_chain+0x99/0x3f0 kernel/notifier.c:86 call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2313 call_netdevice_notifiers_extack net/core/dev.c:2351 [inline] call_netdevice_notifiers net/core/dev.c:2365 [inline] register_netdevice+0x16f5/0x26b0 net/core/dev.c:11782 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1080 [inline] nsim_create+0xba6/0x12f0 drivers/net/netdevsim/netdev.c:1162 __nsim_dev_port_add+0x3ba/0x8f0 drivers/net/netdevsim/dev.c:1433 nsim_dev_port_add_all drivers/net/netdevsim/dev.c:1494 [inline] nsim_drv_probe+0xd72/0x1350 drivers/net/netdevsim/dev.c:1655 call_driver_probe drivers/base/dd.c:629 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:707 __driver_probe_device+0x210/0x460 drivers/base/dd.c:869 driver_probe_device+0x4a/0x140 drivers/base/dd.c:899 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1027 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4c0 drivers/base/dd.c:1131 device_initial_probe+0xaf/0xf0 drivers/base/dd.c:1190 __bus_probe_device+0x60/0x160 drivers/base/bus.c:614 device_add+0x121d/0x1970 drivers/base/core.c:3778 nsim_bus_dev_new drivers/net/netdevsim/bus.c:468 [inline] new_device_store+0x44d/0x6d0 drivers/net/netdevsim/bus.c:191 bus_attr_store+0x74/0xb0 drivers/base/bus.c:172 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:575 [inline] vfs_write+0x6af/0x1040 fs/read_write.c:667 ksys_write+0x12a/0x250 fs/read_write.c:719 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc627b6a2ce Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08 RSP: 002b:00007ffdcce38018 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000055557c2a9500 RCX: 00007fc627b6a2ce RDX: 0000000000000003 RSI: 00007ffdcce380a0 RDI: 0000000000000005 RBP: 00007fc627c39a68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 00007ffdcce380a0 R14: 00007ffdcce388e0 R15: 0000000000000003 netdevsim netdevsim8 netdevsim0: renamed from eth0 8021q: adding VLAN 0 to HW filter on device netdevsim0