Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1638000lqo; Sat, 18 May 2024 11:53:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW2kPVflzaLopxoQzPt0T+KL+1Ik7+3KOafDnYAHvYzswFY17c9244KiyS/BgrRAKNNlcSB3OKQkBd+APz2SyU0Kwvfb3ZkQCva3LDKyg== X-Google-Smtp-Source: AGHT+IFdJ2O8tM/Mgz3Euv8EenTUAgXWbRRz20uY/uEeas3vU4N+7fyoZxyyOuoCSXuIGlrkcnqU X-Received: by 2002:a05:6e02:198b:b0:36b:f8:e884 with SMTP id e9e14a558f8ab-36cc14f87d5mr332483005ab.20.1716058428743; Sat, 18 May 2024 11:53:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716058428; cv=pass; d=google.com; s=arc-20160816; b=vrCGxjaVVF/riPNLlhwvSAQOHIy5s+EFEroEuXdas+1msw/2Su1hjLMkV/P1Aztup4 26JghruqzQTbjFx5dlqHfCVa+uvnqbhTbS76m9tWJNudM4gVt2ePfoTtwNwF4uO8pxsW hSognEJIX7lUVKMkapO46Aw1I52dhgAb2+qDeiHPD90TiGDXLu5icMxDo1k0rPuHJ1B2 CiYSJvTzbyXDa1qikPNzkyR/gRXxPrqO1eLTU2kwBEVdTrVSli5xe0lDBMHbkHZ7afC1 Spx7FrfWLdx67937gG31rNrIMgoezUaZxY97VZueJdxKqgSpOV27hvf93BuxiJqUpyH8 s83Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:message-id:date:mime-version:list-unsubscribe :list-subscribe:list-id:precedence; bh=jmqBSJMyaQSkwkaSX9SRtYVcBMPda0xro2Wg0fWt3pc=; fh=Hqp01tm8fE8/etjdQmepSRJFZwImmuRe+lQQWLQ7raI=; b=hLQWRrRMjf296mzLGqepsuE//nIrBSG/GjuLjXbiCStrHaVLnM+GfliOCLx8IuPVp1 ENOwMEDLdlMUEu6Aw3aUtecELH+g7EsQL2gH2bC/YsGFjtMBqYx5CLCpNK8O5bK+Oj8R 5ObYegaFxLCcxRQERoNWqVMq9mOIXOrVgohH9KgSZkuiiNUoQyJATm0VAVXcNFmcCgR4 4J3r21YEp+Dtt8mvxwacbjvS1IUL5Pxy1tUugE8bczK/mqN+iOKt23NJA0XBIjcC1Q23 5tws61a6/Nak2kPTJwgMgr3+cdM8uhywLHgj1O4HVKLyZwvPenALi7r6a/dcKgETAJgK /RCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-182938-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-657114964fasi4657930a12.520.2024.05.18.11.53.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 May 2024 11:53:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182938-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-182938-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 32663B20EC3 for ; Sat, 18 May 2024 18:53:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECB3355769; Sat, 18 May 2024 18:53:35 +0000 (UTC) Received: from mail-io1-f77.google.com (mail-io1-f77.google.com [209.85.166.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9884F56454 for ; Sat, 18 May 2024 18:53:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.77 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716058415; cv=none; b=kadg15THux1uc1jxKWG0BU8XQmugLd+qvBFT6+IcnJZET/dyVQUmf9Nzc3Uuyva3AtBt6rNYFeojIJOO8icQNpPQgxCcarb3fQHQUPh3WACqJcAUwBRXgd/2EPd/KmH+1gjupOTs7S0af4/Mk0vIJ7l3tzgmKPFFCejleM1nGHo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716058415; c=relaxed/simple; bh=PzvWtsYxvq9OvEyn5u7y1pLUR9t9O6XwE27nVOaJft0=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=n7GlKAQNtxZBZWOliX3LZVFbMRxS1ayX9OI8rbiUt0c6uwTZkXUq+WCkcQ1lSQhA1hfOFZFcA5BiLuM/O4At21VRgXyNgPpnO231lUK5NNEfPut3gDhtgsZcAM6hX2GxducatGleuMcF5kjtZ4zsK56wC7lXUCkjBeNxLkHcs5M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.77 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-io1-f77.google.com with SMTP id ca18e2360f4ac-7dabc125bddso1186955439f.1 for ; Sat, 18 May 2024 11:53:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716058413; x=1716663213; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jmqBSJMyaQSkwkaSX9SRtYVcBMPda0xro2Wg0fWt3pc=; b=eROm7vnG6MyeQu/g0MnquYGF41/gWlHKHU+XKB2RHIMTgrYR8Kaw6QK6iM0dsO60qs NoCdFEOXAEWFCbr03GSTkZO1EzB6jT62dGL3zrAwEciXe3Oh33OB6O2phsqx7e7OUQbC /0trWaE2OUXSkph0837JwLusWThC/QNpzjd3rOXprvogWOBJEWNGzwz0RounQFc2ctPg aAwxbLOUF+99PDgUv+kSWa6i7A9eLDe5cZN/0fc356+l2xu8vt4i/LVv7VArDvS/81Cm eUgN9cU1ZMYMK39/vSfXgcuS2tlveRYWhsGFTCCTd4J2BdOy8jzQ0e+b2sV0XuI4vb7L w0EQ== X-Forwarded-Encrypted: i=1; AJvYcCUy+lKx+G0X4jC0fw3JM8kNfSsVxJl15aWwght+dOi1rX64vBqA8+ZLVlLBNn1jFVwX38Dh3aiKMKVekcew3IsNmB3l7T5Dkxl8fl+u X-Gm-Message-State: AOJu0Ywfq6MezKSmg3UPtXtjyS8hqeRYUAuQ3ikme6OuuleNx4d1y7KQ 4oaOR9YDWSZdDOu7HAvzzfhu2Zv/6FtETUPP0nxNTsKlfzOE1+BQhWcLr/QvF9UANeO4eypEIUQ biajRvrWSEHkq0YjLowp9RPyC2wIhnm11aRrEdJa0Kkt1XcbQoUasX9k= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6638:3782:b0:488:7748:107a with SMTP id 8926c6da1cb9f-48958c02105mr1751686173.4.1716058412951; Sat, 18 May 2024 11:53:32 -0700 (PDT) Date: Sat, 18 May 2024 11:53:32 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000001e3b5d0618befc84@google.com> Subject: [syzbot] [nilfs?] possible deadlock in nilfs_evict_inode (2) From: syzbot To: konishi.ryusuke@gmail.com, linux-kernel@vger.kernel.org, linux-nilfs@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: 6bfd2d442af5 Merge tag 'irq-core-2024-05-12' of git://git... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=13aefc20980000 kernel config: https://syzkaller.appspot.com/x/.config?x=395546166dcfe360 dashboard link: https://syzkaller.appspot.com/bug?extid=c48f1971ba117125f94c compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 userspace arch: i386 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-6bfd2d44.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/7ad901fe99c6/vmlinux-6bfd2d44.xz kernel image: https://storage.googleapis.com/syzbot-assets/8d6ef2df621f/bzImage-6bfd2d44.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+c48f1971ba117125f94c@syzkaller.appspotmail.com ====================================================== WARNING: possible circular locking dependency detected 6.9.0-syzkaller-01893-g6bfd2d442af5 #0 Not tainted ------------------------------------------------------ kswapd0/111 is trying to acquire lock: ffff888018e7e610 (sb_internal#4){.+.+}-{0:0}, at: nilfs_evict_inode+0x157/0x550 fs/nilfs2/inode.c:924 but task is already holding lock: ffffffff8d9390c0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x166/0x1a10 mm/vmscan.c:6782 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:3698 [inline] fs_reclaim_acquire+0x102/0x160 mm/page_alloc.c:3712 might_alloc include/linux/sched/mm.h:312 [inline] prepare_alloc_pages.constprop.0+0x155/0x560 mm/page_alloc.c:4346 __alloc_pages+0x194/0x2460 mm/page_alloc.c:4564 alloc_pages_mpol+0x275/0x610 mm/mempolicy.c:2264 folio_alloc+0x1e/0x40 mm/mempolicy.c:2342 filemap_alloc_folio+0x3ba/0x490 mm/filemap.c:984 __filemap_get_folio+0x527/0xa90 mm/filemap.c:1926 pagecache_get_page+0x2c/0x260 mm/folio-compat.c:93 block_write_begin+0x38/0x4a0 fs/buffer.c:2209 nilfs_write_begin+0x9f/0x1a0 fs/nilfs2/inode.c:262 page_symlink+0x356/0x450 fs/namei.c:5236 nilfs_symlink+0x23c/0x3c0 fs/nilfs2/namei.c:153 vfs_symlink fs/namei.c:4489 [inline] vfs_symlink+0x3e8/0x630 fs/namei.c:4473 do_symlinkat+0x263/0x310 fs/namei.c:4515 __do_sys_symlink fs/namei.c:4536 [inline] __se_sys_symlink fs/namei.c:4534 [inline] __ia32_sys_symlink+0x78/0xa0 fs/namei.c:4534 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #1 (&nilfs->ns_segctor_sem){++++}-{3:3}: down_read+0x9a/0x330 kernel/locking/rwsem.c:1526 nilfs_transaction_begin+0x326/0xa40 fs/nilfs2/segment.c:223 nilfs_symlink+0x114/0x3c0 fs/nilfs2/namei.c:140 vfs_symlink fs/namei.c:4489 [inline] vfs_symlink+0x3e8/0x630 fs/namei.c:4473 do_symlinkat+0x263/0x310 fs/namei.c:4515 __do_sys_symlink fs/namei.c:4536 [inline] __se_sys_symlink fs/namei.c:4534 [inline] __ia32_sys_symlink+0x78/0xa0 fs/namei.c:4534 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #0 (sb_internal#4){.+.+}-{0:0}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1661 [inline] sb_start_intwrite include/linux/fs.h:1844 [inline] nilfs_transaction_begin+0x21b/0xa40 fs/nilfs2/segment.c:220 nilfs_evict_inode+0x157/0x550 fs/nilfs2/inode.c:924 evict+0x2ed/0x6c0 fs/inode.c:667 iput_final fs/inode.c:1741 [inline] iput.part.0+0x5a8/0x7f0 fs/inode.c:1767 iput+0x5c/0x80 fs/inode.c:1757 dentry_unlink_inode+0x295/0x440 fs/dcache.c:400 __dentry_kill+0x1d0/0x600 fs/dcache.c:603 shrink_kill fs/dcache.c:1048 [inline] shrink_dentry_list+0x140/0x5d0 fs/dcache.c:1075 prune_dcache_sb+0xeb/0x150 fs/dcache.c:1156 super_cache_scan+0x32a/0x550 fs/super.c:221 do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435 shrink_slab_memcg mm/shrinker.c:548 [inline] shrink_slab+0xa87/0x1310 mm/shrinker.c:626 shrink_one+0x493/0x7c0 mm/vmscan.c:4774 shrink_many mm/vmscan.c:4835 [inline] lru_gen_shrink_node+0x89f/0x1750 mm/vmscan.c:4935 shrink_node mm/vmscan.c:5894 [inline] kswapd_shrink_node mm/vmscan.c:6704 [inline] balance_pgdat+0x10d1/0x1a10 mm/vmscan.c:6895 kswapd+0x5ea/0xbf0 mm/vmscan.c:7164 kthread+0x2c1/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 other info that might help us debug this: Chain exists of: sb_internal#4 --> &nilfs->ns_segctor_sem --> fs_reclaim Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&nilfs->ns_segctor_sem); lock(fs_reclaim); rlock(sb_internal#4); *** DEADLOCK *** 2 locks held by kswapd0/111: #0: ffffffff8d9390c0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x166/0x1a10 mm/vmscan.c:6782 #1: ffff888018e7e0e0 (&type->s_umount_key#74){++++}-{3:3}, at: super_trylock_shared fs/super.c:561 [inline] #1: ffff888018e7e0e0 (&type->s_umount_key#74){++++}-{3:3}, at: super_cache_scan+0x96/0x550 fs/super.c:196 stack backtrace: CPU: 2 PID: 111 Comm: kswapd0 Not tainted 6.9.0-syzkaller-01893-g6bfd2d442af5 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1661 [inline] sb_start_intwrite include/linux/fs.h:1844 [inline] nilfs_transaction_begin+0x21b/0xa40 fs/nilfs2/segment.c:220 nilfs_evict_inode+0x157/0x550 fs/nilfs2/inode.c:924 evict+0x2ed/0x6c0 fs/inode.c:667 iput_final fs/inode.c:1741 [inline] iput.part.0+0x5a8/0x7f0 fs/inode.c:1767 iput+0x5c/0x80 fs/inode.c:1757 dentry_unlink_inode+0x295/0x440 fs/dcache.c:400 __dentry_kill+0x1d0/0x600 fs/dcache.c:603 shrink_kill fs/dcache.c:1048 [inline] shrink_dentry_list+0x140/0x5d0 fs/dcache.c:1075 prune_dcache_sb+0xeb/0x150 fs/dcache.c:1156 super_cache_scan+0x32a/0x550 fs/super.c:221 do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435 shrink_slab_memcg mm/shrinker.c:548 [inline] shrink_slab+0xa87/0x1310 mm/shrinker.c:626 shrink_one+0x493/0x7c0 mm/vmscan.c:4774 shrink_many mm/vmscan.c:4835 [inline] lru_gen_shrink_node+0x89f/0x1750 mm/vmscan.c:4935 shrink_node mm/vmscan.c:5894 [inline] kswapd_shrink_node mm/vmscan.c:6704 [inline] balance_pgdat+0x10d1/0x1a10 mm/vmscan.c:6895 kswapd+0x5ea/0xbf0 mm/vmscan.c:7164 kthread+0x2c1/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 --- 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. 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