From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.231.136 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796389604; b=LZg4Sj5PqH8s5zTIFEzVOQkM8bjaBYy8kgEeMytoJzTbeQ09oE4oH+2GrUo6JoTG3nMn ARWkMVubchF9eu8HuSLAEipkGs1+1q0HbO10bTwlOCTgYhZdHl8fhclfjd0dmm9qnxWQM iHsh7C9FAasYsDXfq27jt9qP6+e2W3A1DwtWmdr9Ee57uoZxWN27xaDA87xUX1xiIU6o7 aId/X3xQcxomOK1zYfX/eU3+kUSnr85qXpwQ/4Y1gFEvi4LGT3RIG65yYcy/ZKiXTUgTq oaWOInR1dmJJtl6ZWbGNm/Pk/MzDqAVEsMTm/CKpwd2euInSXcQdGlGujjVmmnEmFAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796389604; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:MIME-Version:X-Received:Date: X-Google-Appengine-App-Id:X-Google-Appengine-App-Id-Alias:Message-ID: Subject:From:To:Content-Type; bh=vVXTcgBXc0+kbinAS3+vaFcNrOPMhQ4nDo9WCjUoAB8=; b=zR99Kffe2QUy2OR8Fd8419xD+FVo4lt4y42a0nR+ob/0NbSjj0KnJO1HfzpO5hFCCMBj sqa7wJcBggCKB4kbrXv/olF4S6ZTkc7lPv+Rb2f/MdmFZrkjO47Jwpl9L5id1r1zOW+Mk Xfzg4fNTP4dtndkYdoQHhE6MvzNXzMmv1V6gPhwVDLPrbTWyuCoG5gTt+xdp00VZDtnrt nqFg2BDFDXS1UdtJm9QtUkQg+SZaV5xoYdgaiuAMcSV5m5UXeB1CnaFr4bSVbwewcMjwx kCwtSMwF1gu5/kEGcSr/2dqFn09U4jPkAlmXRVCAzjl0MSKTYn7jFVoarPkF0W1Y8iA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.remote-ip=74.125.231.136 Received: from mail-oo2-f8.google.com (mail-oo2-f8.google.com [74.125.231.136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8638F606A32D for ; Fri, 4 Dec 2026 13:06:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8638F606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo2-f8.google.com with SMTP id 006d021491bc7-71733a926edso43727eaf.1 for ; Fri, 04 Dec 2026 05:06:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796389602; x=1796994402; h=content-type:to:from:subject:message-id:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=vVXTcgBXc0+kbinAS3+vaFcNrOPMhQ4nDo9WCjUoAB8=; b=ob044Nfpf05pm0BeHzS1tBPWN1bCZkaouRLj1Gar9CDSfiJxf+hN+4vslPWqL+56/i qkj3jg8AG42UPyRBQgKIz0jmfT8bzDcImj5W4ArCZkaGg2C9r3rasol1IektZKNgk7tg gOQ99BJ9eF0rs0kRFxWK6Y+1ACqWGat8Dgypf6FU3+i+QJzmWrdPOeiU5jI0/Lz71lFU i2J9fmyLBQraEHSCBycFoYVhwkkamAwlzUOX5TsAeKBIV8zyuuHYoyV4P2wO5x2tFUiJ +ALUwpDeDI7b7rWuyZ6kO2z/FlvWjOKxnBJ9MReg4uqAe3ObmPn/IaLPz4YrMD+jpe4E va0w== X-Forwarded-Encrypted: i=1; AL+hErHUOMnBlaYqFoidqRnNaGtxB1HLEWjFyDQelEqFSXNVUcW9ElcuZuNxG3w8f1WyUkUcxScsjKO0Bek/zA==@vger.kernel.org X-Gm-Message-State: APuU4Z9e5NoGmJqyZpWm3ENOnVXhI/ZMZNPtt+8QYHhxd5fQt5f5lhEc gJMQYLMS+hsjd31skbRQGs1ciSrAXYZL6s6W6o7zlE/xCmMMmIGQE2W7hhCjOzrbD2JvFeaqjjF oLliMtHdH9YGmCKxT9634Fnz4kLAZYjfs9YSuNo/AgbvP4ECbugQzbpxxNdw= X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Received: by 2002:a05:6820:617:b0:6d7:a13d:fd7b with SMTP id 006d021491bc7-71bf2073678mr1439295eaf.28.1796389602570; Fri, 04 Dec 2026 05:06:42 -0800 (PST) Date: Fri, 04 Dec 2026 05:06:42 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6b12bae2.22b41460.29d412.0208.GAE@google.com> Subject: [syzbot] [nbd?] possible deadlock in secretmem_fault (2) From: syzbot To: akpm@linux-foundation.org, axboe@kernel.dk, edumazet@google.com, josef@toxicpanda.com, kartikey406@gmail.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, nbd@other.debian.org, rppt@kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: d06ce6f1eb5e Merge tag 'for_linus' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1391a9d5580000 kernel config: https://syzkaller.appspot.com/x/.config?x=dd30868b29ec6dd0 dashboard link: https://syzkaller.appspot.com/bug?extid=bb13485947f1062540db compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/03676b24a70b/disk-d06ce6f1.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/0903991feec6/vmlinux-d06ce6f1.xz kernel image: https://storage.googleapis.com/syzbot-assets/9af15ee06c1d/bzImage-d06ce6f1.xz The issue was bisected by AI to: commit 9280e6edf65662b6aafc8b704ad065b54c08b519 Author: Deepanshu Kartikey Date: Sun Jun 21 23:52:55 2026 +0000 nbd: don't warn when reclassifying a busy socket lock reasoning: https://syzkaller.appspot.com/ai_job?id=4d6caa57-36d4-420a-86e7-6f14c34909fb AI-generated root cause summary: The lockdep circular locking dependency is caused by `nbd_reclassify_socket()` in `drivers/block/nbd.c` silently skipping lock-class reclassification when `sock_allow_reclassification(sk)` returns false. Because `nbd_add_socket()` accepts an arbitrary userspace socket fd, a concurrent syscall or softirq holding `sk->sk_lock` or `sk->sk_lock.slock` causes `nbd_reclassify_socket()` to return early without reclassifying `sk->sk_lock` to `sk_lock-AF_INET6-NBD`. Leaving the NBD socket in the generic `sk_lock-AF_INET6` lockdep class causes lockdep to conflate NBD's socket lock (acquired under `nsock->tx_lock`, `cmd->lock`, `set->srcu`, `q->elevator_lock`, `q->q_usage_counter(io)`, and `fs_reclaim`) with unrelated `AF_INET6` sockets such as `rawv6_sendmsg()`, which acquire `mm->mmap_lock` (and subsequently `mapping->invalidate_lock` and `fs_reclaim` in `secretmem_fault()`). full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=bb13485947f1062540db IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+bb13485947f1062540db@syzkaller.appspotmail.com The bisection result may be wrong. If you agree with it, please also add: Fixes: 9280e6edf656 ("nbd: don't warn when reclassifying a busy socket lock") ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.8.2498/12962 is trying to acquire lock: ffffffff901db8a0 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:316 [inline] ffffffff901db8a0 (fs_reclaim){+.+.}-{0:0}, at: prepare_alloc_pages+0x166/0x5b0 mm/page_alloc.c:5165 but task is already holding lock: ffff888057f03258 (mapping.invalidate_lock#9){++++}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline] ffff888057f03258 (mapping.invalidate_lock#9){++++}-{4:4}, at: secretmem_fault+0x1c5/0xbe0 mm/secretmem.c:125 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #8 (mapping.invalidate_lock#9){++++}-{4:4}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 down_read+0x94/0x4c0 kernel/locking/rwsem.c:1574 filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline] secretmem_fault+0x1c5/0xbe0 mm/secretmem.c:125 __do_fault+0x10b/0x440 mm/memory.c:5693 do_shared_fault mm/memory.c:6208 [inline] do_fault+0x524/0x1780 mm/memory.c:6282 do_pte_missing mm/memory.c:4800 [inline] handle_pte_fault mm/memory.c:6697 [inline] __handle_mm_fault+0x1858/0x2f40 mm/memory.c:6849 handle_mm_fault+0x363/0xa30 mm/memory.c:7016 do_user_addr_fault+0x745/0x12f0 arch/x86/mm/fault.c:1394 handle_page_fault arch/x86/mm/fault.c:1483 [inline] exc_page_fault+0x6f/0xd0 arch/x86/mm/fault.c:1536 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 -> #7 (&mm->mmap_lock){++++}-{4:4}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __might_fault+0xde/0x140 mm/memory.c:7607 _inline_copy_from_user include/linux/uaccess.h:169 [inline] _copy_from_user+0x29/0xd0 lib/usercopy.c:18 copy_from_user include/linux/uaccess.h:222 [inline] csum_and_copy_from_user include/net/checksum.h:31 [inline] copy_from_user_iter_csum net/core/skbuff.c:7703 [inline] iterate_ubuf include/linux/iov_iter.h:30 [inline] iterate_and_advance2 include/linux/iov_iter.h:302 [inline] csum_and_copy_from_iter_full+0x21a/0x1fe0 net/core/skbuff.c:7715 ip_generic_getfrag+0x172/0x270 net/ipv4/ip_output.c:949 raw6_getfrag+0x22c/0x290 net/ipv6/raw.c:743 __ip6_append_data+0x37e8/0x4b10 net/ipv6/ip6_output.c:1739 ip6_append_data net/ipv6/ip6_output.c:1894 [inline] ip6_append_data+0x10b/0x410 net/ipv6/ip6_output.c:1863 rawv6_sendmsg+0x169c/0x4630 net/ipv6/raw.c:917 inet_sendmsg+0x11c/0x140 net/ipv4/af_inet.c:866 sock_sendmsg_nosec net/socket.c:800 [inline] __sock_sendmsg net/socket.c:818 [inline] ____sys_sendmsg+0x9a0/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 -> #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:3909 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 elevator_set_none+0x92/0xf0 block/elevator.c:769 blk_mq_elv_switch_none block/blk-mq.c:5171 [inline] __blk_mq_update_nr_hw_queues block/blk-mq.c:5216 [inline] blk_mq_update_nr_hw_queues+0x4e1/0x1690 block/blk-mq.c:5284 nbd_start_device+0x1a6/0xbd0 drivers/block/nbd.c:1531 nbd_genl_connect+0xfc2/0x1770 drivers/block/nbd.c:2311 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 -> #1 (&q->q_usage_counter(io)#49){++++}-{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 nbd_dev_add+0x491/0xb10 drivers/block/nbd.c:1997 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 -> #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] prepare_alloc_pages+0x166/0x5b0 mm/page_alloc.c:5165 __alloc_frozen_pages_noprof+0x1b9/0x31e0 mm/page_alloc.c:5490 alloc_pages_mpol+0x201/0x560 mm/mempolicy.c:2520 alloc_pages_noprof mm/mempolicy.c:2611 [inline] folio_alloc_noprof+0x22/0x250 mm/mempolicy.c:2621 secretmem_fault+0x399/0xbe0 mm/secretmem.c:130 __do_fault+0x10b/0x440 mm/memory.c:5693 do_shared_fault mm/memory.c:6208 [inline] do_fault+0x524/0x1780 mm/memory.c:6282 do_pte_missing mm/memory.c:4800 [inline] handle_pte_fault mm/memory.c:6697 [inline] __handle_mm_fault+0x1858/0x2f40 mm/memory.c:6849 handle_mm_fault+0x363/0xa30 mm/memory.c:7016 do_user_addr_fault+0x745/0x12f0 arch/x86/mm/fault.c:1394 handle_page_fault arch/x86/mm/fault.c:1483 [inline] exc_page_fault+0x6f/0xd0 arch/x86/mm/fault.c:1536 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 other info that might help us debug this: Chain exists of: fs_reclaim --> &mm->mmap_lock --> mapping.invalidate_lock#9 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(mapping.invalidate_lock#9); lock(&mm->mmap_lock); lock(mapping.invalidate_lock#9); lock(fs_reclaim); *** DEADLOCK *** locks held by syz.8.2498/12962: 2, on CPU#0: #0: ffff888036dcccc0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_trylock include/linux/mmap_lock.h:635 [inline] #0: ffff888036dcccc0 (&mm->mmap_lock){++++}-{4:4}, at: get_mmap_lock_carefully mm/mmap_lock.c:568 [inline] #0: ffff888036dcccc0 (&mm->mmap_lock){++++}-{4:4}, at: lock_mm_and_find_vma+0x35/0x750 mm/mmap_lock.c:628 #1: ffff888057f03258 (mapping.invalidate_lock#9){++++}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline] #1: ffff888057f03258 (mapping.invalidate_lock#9){++++}-{4:4}, at: secretmem_fault+0x1c5/0xbe0 mm/secretmem.c:125 stack backtrace: CPU: 0 UID: 0 PID: 12962 Comm: syz.8.2498 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] prepare_alloc_pages+0x166/0x5b0 mm/page_alloc.c:5165 __alloc_frozen_pages_noprof+0x1b9/0x31e0 mm/page_alloc.c:5490 alloc_pages_mpol+0x201/0x560 mm/mempolicy.c:2520 alloc_pages_noprof mm/mempolicy.c:2611 [inline] folio_alloc_noprof+0x22/0x250 mm/mempolicy.c:2621 secretmem_fault+0x399/0xbe0 mm/secretmem.c:130 __do_fault+0x10b/0x440 mm/memory.c:5693 do_shared_fault mm/memory.c:6208 [inline] do_fault+0x524/0x1780 mm/memory.c:6282 do_pte_missing mm/memory.c:4800 [inline] handle_pte_fault mm/memory.c:6697 [inline] __handle_mm_fault+0x1858/0x2f40 mm/memory.c:6849 handle_mm_fault+0x363/0xa30 mm/memory.c:7016 do_user_addr_fault+0x745/0x12f0 arch/x86/mm/fault.c:1394 handle_page_fault arch/x86/mm/fault.c:1483 [inline] exc_page_fault+0x6f/0xd0 arch/x86/mm/fault.c:1536 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 RIP: 0033:0x7f38c5468b82 Code: 30 48 8b 14 24 48 85 d2 74 17 8b 44 24 10 0f c8 89 c0 48 89 44 24 10 48 83 fa 01 0f 85 aa 02 00 00 48 8b 44 24 18 8b 74 24 10 <89> 30 e9 1e fe ff ff 48 8b 44 24 18 8b 10 48 8b 04 24 48 85 c0 0f RSP: 002b:00007fffd3b1ef10 EFLAGS: 00010246 RAX: 0000200000000040 RBX: 0000000000000004 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00005555634703d8 RBP: 00007fffd3b1f038 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000100000001 R11: 0000000000000004 R12: 00007f38c5835fac R13: 00007fffd3b1f070 R14: 000000000006bddf R15: 00007f38c5835fa0 --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#ai-bisection If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup