Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1640189lqs; Sat, 15 Jun 2024 20:06:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWumyTtoT1jP9PmU06N3E9DgvmHc8Re1OibcGsJ1JK1t4oL/SUuZUSF+IsGAC5QZWmsB2KAX4K++Fkv1O3pYbm9ro+0OL/vJyowKKPqxg== X-Google-Smtp-Source: AGHT+IGmI/+kfIsD8LmBMkLxPaX8bTwCzhZHTyIDn+aY3z0P9D9ZewrpS0UxbO5gWOdQU/VOV4dF X-Received: by 2002:a05:6512:533:b0:52c:890e:e8e7 with SMTP id 2adb3069b0e04-52ca6e941f5mr4224007e87.50.1718507177025; Sat, 15 Jun 2024 20:06:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718507176; cv=pass; d=google.com; s=arc-20160816; b=aNUITM98Vps6f0XnCr4NWgqVIDAyuBJUHGmDHHSYzR/UlgLhz+jpW72IUami+OLlh7 T2VV73SmodNNNbQ4rm8AH81Qw3JveFY5G2BN3CKjAsmDo+53W7Xpq87+ucRqKXvT+QNo Mr8hxxmGSj6408iTufnH8QKTV4WwKlgNoHwlS1HfWi8Mkid31/s9rej8hqO7GT/ZSUKE kMWvYuWMsY1AtMLZkUwWHRRW3wOP0AAYMB7AzPABhgYu9ZndtMoXEHyTfztGvb1Sxszx oW0NLDM6ZIkc0h/L34xSJ9CDFm+rw/T/u6cYjwe/sNtpQqesRqAnD1mZamqWPGc2qA5o HW7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:message-id:in-reply-to:date:mime-version :list-unsubscribe:list-subscribe:list-id:precedence; bh=lL4pEt8CNUQGiLnXmuWRmkgKbbs2AYt2k3t4y5TtmrY=; fh=X8U54gZ6RaZilfAMTeIfw2LrWv/skSkC6tyajq8twM4=; b=tMwnNCnD4Fk1yv43PxN1OnbF0lV+9Gqr8s8gtAAqoamkMcQzbvOWG6PiUOsDvVBDKQ /SVTNnRb9bKIHe8hfIcZChsJxHPFPZfY6Dtjkp2r/yX8PJ7w1GuZPceM/r43otosL9jH nEHShwnJEfrYXZz1knzcwwu0NtsgK5biDpiUY6Z/Bvi57LB2gI5kkmlnxudDY1dn0SzZ s9GVLMcPCR3req5o6e+h/r7QhMvxnevwkQ/dMJLegH8ejA8KTAFdzLcUu9at1sxrv74N mUczxfP0GYVyW1wy8Fu1ihXadH+levV52wgjjdRyPl/ViUh+rYss5A3jOtqjWnMMmV3U wCFg==; 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-216098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56dd6610si321573266b.357.2024.06.15.20.06.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 20:06:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-216098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-216098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216098-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8C53A1F220DB for ; Sun, 16 Jun 2024 03:06:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC12816C6BF; Sun, 16 Jun 2024 03:06:05 +0000 (UTC) Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) (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 C598D2F26 for ; Sun, 16 Jun 2024 03:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.71 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718507165; cv=none; b=sXpg9H8ExnE5WCAviGaEEuXzKQ7uMKBB9wkOQHxH+MhuviE0j+6vBxHR5lEzZWfq/3XJ8s9NHViONIOuBfY5FJ3Cf9V6zM7DjRt/xdJBjLjaBytJZdLDzwaGcm4El9VhcScENFySA17mSJj3KrMR5tgiFXbOq+cLHgW+hCtnKp0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718507165; c=relaxed/simple; bh=CvPap5L5VyXRFDjRh7/5UpHsK18wFSUDKUAFMLfPWF8=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=pyl9AoAVfa+sp4zCvuyVwUyy/USR2mrfsewKgUpz1W0Y7UDqLVxuBB/0Q0pr8idry/vGTwuJ5jCQiWzY6Zk+yCwIWAB6Bohz0a7krF294OmmnGnqmBRLsvFOYUlupljh1rNugKc2yZXpQWEaUjDZhAXl9jRi/sVWM1YnzTrA3y4= 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.71 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-f71.google.com with SMTP id ca18e2360f4ac-7ee039d3e7dso68117739f.1 for ; Sat, 15 Jun 2024 20:06:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718507163; x=1719111963; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lL4pEt8CNUQGiLnXmuWRmkgKbbs2AYt2k3t4y5TtmrY=; b=em9oAYg2kj+WO7X0HQXQjhVJ7pCl/0vuIZ4Va5oKxJfzjouL53Q8b92JnynxSW5QlF Lg91qWvIq6Hy7OqBT4DnGrvYyRrnOo1jgg6RCuZBMLGvwnmDe2Spakrbni+zs1loKhm6 h+J4Cl0Pmhrgejt/R9iQKeUIhinjCjS1JBmWxqmRTh0dPcbiphFk09YPWslGcdouQ7C/ Au7PKOaELwIqacGjiNN5y8VkB2BwmDfLf/32fFClw/m60GqmSf8DJw0PJk6K2lpJjion bRmk4kKhDtYc6Yo9pxhTtuqRAYN0Z0oryhCVUKbYWXTd13CDEfLeUEch0bzk42SXC9sl +R7w== X-Forwarded-Encrypted: i=1; AJvYcCWsNSvdifZgknSPHsgRNIq64ECTNT0rR+6uDDSr5GkJACJWLzuvWm0xmXPDMNOEDEDsWrlAjhxTT57Yl2QD2ttxmmqpc0L3CXW3ziGj X-Gm-Message-State: AOJu0YxgS/iXMuCnLLQKU1N3bQvl4DO/AMbDIoB1i0mtsn6bKK5Fd7ih ltSm+SDS2iqkxM8UoDV0HanlQKolGoDbPVO53DZ3o9VtzmNlM5hD1XjqqidrsIQ4w8CegmI7/OU e8OR9PlRNYTsTfS9Cl+R/LoFT5X0brHWhieSI97CTyqrSu4oTLyhiXCc= 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:371f:b0:4b9:6637:4909 with SMTP id 8926c6da1cb9f-4b966374a6emr223126173.6.1718507162965; Sat, 15 Jun 2024 20:06:02 -0700 (PDT) Date: Sat, 15 Jun 2024 20:06:02 -0700 In-Reply-To: <20240616023951.1250-1-hdanton@sina.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000fe2d22061af9206f@google.com> Subject: Re: [syzbot] [nilfs?] [mm?] KASAN: slab-use-after-free Read in lru_add_fn From: syzbot To: hdanton@sina.com, jack@suse.cz, konishi.ryusuke@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-nilfs@vger.kernel.org, syzkaller-bugs@googlegroups.com, willy@infradead.org Content-Type: text/plain; charset="UTF-8" Hello, syzbot has tested the proposed patch but the reproducer is still triggering an issue: kernel BUG in __filemap_add_folio NILFS (loop0): I/O error reading meta-data file (ino=3, block-offset=0) NILFS (loop0): I/O error reading meta-data file (ino=3, block-offset=0) NILFS (loop0): disposed unprocessed dirty file(s) when stopping log writer ------------[ cut here ]------------ kernel BUG at mm/filemap.c:873! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 1 PID: 5321 Comm: syz-executor Not tainted 6.10.0-rc3-syzkaller-dirty #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:__filemap_add_folio+0xd1d/0xe80 mm/filemap.c:873 Code: 37 8b 4c 89 f7 e8 23 68 10 00 90 0f 0b e8 9b 14 ce ff 48 c7 c6 e0 92 37 8b 4c 89 f7 e8 0c 68 10 00 90 0f 0b e8 84 14 ce ff 90 <0f> 0b e8 7c 14 ce ff 90 0f 0b 90 e9 24 fb ff ff e8 6e 14 ce ff 48 RSP: 0018:ffffc900035773f0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff81bfc8cd RDX: ffff888023052440 RSI: ffffffff81bfd0cc RDI: 0000000000000001 RBP: ffff88803233a9f0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000003 R12: ffffc90003577468 R13: 0000000000000000 R14: ffffea0000b3f7c0 R15: 0000000000000000 FS: 000055556c846480(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffe311b9ff8 CR3: 000000001ae02000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: filemap_add_folio+0x110/0x220 mm/filemap.c:971 __filemap_get_folio+0x455/0xa80 mm/filemap.c:1959 filemap_grab_folio include/linux/pagemap.h:697 [inline] nilfs_grab_buffer+0xc3/0x370 fs/nilfs2/page.c:57 nilfs_mdt_submit_block+0x9f/0x870 fs/nilfs2/mdt.c:121 nilfs_mdt_read_block+0xa4/0x3b0 fs/nilfs2/mdt.c:176 nilfs_mdt_get_block+0xdb/0xb90 fs/nilfs2/mdt.c:251 nilfs_palloc_get_block+0xb5/0x300 fs/nilfs2/alloc.c:217 nilfs_palloc_get_entry_block+0x165/0x1b0 fs/nilfs2/alloc.c:319 nilfs_ifile_delete_inode+0x1e6/0x260 fs/nilfs2/ifile.c:109 nilfs_evict_inode+0x294/0x550 fs/nilfs2/inode.c:950 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 nilfs_put_root+0xae/0xe0 fs/nilfs2/the_nilfs.c:925 nilfs_segctor_destroy fs/nilfs2/segment.c:2788 [inline] nilfs_detach_log_writer+0x5ef/0xaa0 fs/nilfs2/segment.c:2850 nilfs_put_super+0x43/0x1b0 fs/nilfs2/super.c:498 generic_shutdown_super+0x159/0x3d0 fs/super.c:642 kill_block_super+0x3b/0x90 fs/super.c:1676 deactivate_locked_super+0xbe/0x1a0 fs/super.c:473 deactivate_super+0xde/0x100 fs/super.c:506 cleanup_mnt+0x222/0x450 fs/namespace.c:1267 task_work_run+0x14e/0x250 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x278/0x2a0 kernel/entry/common.c:218 do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f70d447e217 Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffe311ba288 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000064 RCX: 00007f70d447e217 RDX: 0000000000000200 RSI: 0000000000000009 RDI: 00007ffe311bb430 RBP: 00007f70d44c8336 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000202 R12: 00007ffe311bb430 R13: 00007f70d44c8336 R14: 000055556c846430 R15: 0000000000000005 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__filemap_add_folio+0xd1d/0xe80 mm/filemap.c:873 Code: 37 8b 4c 89 f7 e8 23 68 10 00 90 0f 0b e8 9b 14 ce ff 48 c7 c6 e0 92 37 8b 4c 89 f7 e8 0c 68 10 00 90 0f 0b e8 84 14 ce ff 90 <0f> 0b e8 7c 14 ce ff 90 0f 0b 90 e9 24 fb ff ff e8 6e 14 ce ff 48 RSP: 0018:ffffc900035773f0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff81bfc8cd RDX: ffff888023052440 RSI: ffffffff81bfd0cc RDI: 0000000000000001 RBP: ffff88803233a9f0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000003 R12: ffffc90003577468 R13: 0000000000000000 R14: ffffea0000b3f7c0 R15: 0000000000000000 FS: 000055556c846480(0000) GS:ffff88806b000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f70d45a8000 CR3: 000000001ae02000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Tested on: commit: 83a7eefe Linux 6.10-rc3 git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git console output: https://syzkaller.appspot.com/x/log.txt?x=15608256980000 kernel config: https://syzkaller.appspot.com/x/.config?x=b8786f381e62940f dashboard link: https://syzkaller.appspot.com/bug?extid=d79afb004be235636ee8 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 patch: https://syzkaller.appspot.com/x/patch.diff?x=147bb012980000