From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f207.google.com (mail-il1-f207.google.com [209.85.166.207]) (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 3DAF8188938 for ; Sat, 8 Feb 2025 04:27:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.207 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738988847; cv=none; b=OtGeGa5+rDzKQx//vkZLpB0S08jdJKXb7W75zMdKCeYXE1OhwbGQSWOUbvt0t1fDuQ3tOTsDTS7ICUrtopjRF5XdjObRMOHxNjl2nMM5qRnJ7Ouga4d22xSNkxyaQp7EwobMUivLfmc0SL5Jfk0SKmc0AaxZJcOeqlou435AZhw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738988847; c=relaxed/simple; bh=bOyJdwonSSZC89a42q+OAhWsoGDY55c4ZGhaSoHMEGw=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=OyFnbagvLZTNQ0bW2D411BtHKEBqwEci85NTMnGtoHWCgVFtE+T5yyoHSXfqsGMyN5TyIJ/Vr+nkEXibdwpmazyEvrk3zvEGdCOZKZ95/Ei7y19Gc4HY1VLuCYpA3tVoMN2rng8U+TUVwCafah1p+anG4UtNt6XS4ifGB1re2B8= 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.207 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-il1-f207.google.com with SMTP id e9e14a558f8ab-3d14a3f812fso17356925ab.3 for ; Fri, 07 Feb 2025 20:27:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738988844; x=1739593644; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hEcdCIGgB0Vn/57Ax2iihJ0TfDTBfU1K58AmEwI4seE=; b=KWP4OLtrLCEPLWBVRnTRajSxGa/T0l7KzByoM9NbsDf6jhHPqMc39x0h9kgDXlYTtr pMP6MdoZPMTUUzGPHea5WkswzPU4GU2iYQ8x2FIbygxVm7X3BPZjhsI5gzauctBa1GnQ f+CSp0ThzqTZ0XBfr6bIS9UUKXcsr2Qmk9dYnB/Up6DRVo4QWc68Uh2MI5HRHj4Iuddl pH1mc96+wxSz+xVUi2BGyCnFgFr1FvcUZ/88YfQUaOEZ923vFnpavZac7AVJBbu4IwGx oW5yww0i6BZjw/JYu0HO+z4fuqNY0Myph6WyMkAtXRU9/KdANRxvNddeYAMrarTV3ci/ RWVg== X-Forwarded-Encrypted: i=1; AJvYcCVovpcmCH+oH7I+w7Vr5N01H+8HAkdrQakDbk18hkihPdrvrGzWatMO+eXSHdGk7y8GGvh13yzXE3GgtYQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yxu1Owx/qkPQfCd7fqbQvls3CifNSpaUNa0QvGK1ijRlG3dTZDR BeG3QcMGunpgz0zkBOuZ7cXSVqGhcRql18GvisRWoyiaFEjH4+qAiEocpnwrbPWsHWv+snSlos4 rXi73/Hv9l4xk5tXuqqWJxGLujlY3gXVDpC/9RTvbLXhoKwnB1tWwCpQ= X-Google-Smtp-Source: AGHT+IGONa3WrAbCBs+aXEuwguWbD84J1vU/jPAEW3IeTBy5fJyVH1dHuEQCe9ofULEBI7Wfi/BzguJoDjtGlw0wXDHBxKdjnSZu Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a92:c544:0:b0:3d0:47e3:40bb with SMTP id e9e14a558f8ab-3d13dcfd0bdmr45240225ab.4.1738988844299; Fri, 07 Feb 2025 20:27:24 -0800 (PST) Date: Fri, 07 Feb 2025 20:27:24 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <67a6dd2c.050a0220.110943.0008.GAE@google.com> Subject: [syzbot] [f2fs?] kernel BUG in folio_end_read From: syzbot To: chao@kernel.org, jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: 0de63bb7d919 Merge tag 'pull-fix' of git://git.kernel.org/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1699f5f8580000 kernel config: https://syzkaller.appspot.com/x/.config?x=1909f2f0d8e641ce dashboard link: https://syzkaller.appspot.com/bug?extid=92895fc54ccb69ca6fa9 compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-0de63bb7.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/1142009a30a7/vmlinux-0de63bb7.xz kernel image: https://storage.googleapis.com/syzbot-assets/5d9e46a8998d/bzImage-0de63bb7.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+92895fc54ccb69ca6fa9@syzkaller.appspotmail.com page: refcount:2 mapcount:0 mapping:ffff8880455a0220 index:0x3807 pfn:0x5806b memcg:ffff888036be0000 aops:f2fs_meta_aops ino:2 flags: 0x4fff400000000a9(locked|waiters|uptodate|lru|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff400000000a9 ffffea0001184188 ffff88804368b240 ffff8880455a0220 raw: 0000000000003807 0000000000000000 00000002ffffffff ffff888036be0000 page dumped because: VM_BUG_ON_FOLIO(success && folio_test_uptodate(folio)) page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x40c40(GFP_NOFS|__GFP_COMP), pid 5320, tgid 5319 (syz.0.0), ts 62351716889, free_ts 62334302156 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_frozen_pages_noprof mm/mempolicy.c:2341 [inline] alloc_pages_noprof+0x121/0x190 mm/mempolicy.c:2361 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2371 filemap_alloc_folio_noprof+0xe1/0x540 mm/filemap.c:1019 __filemap_get_folio+0x438/0xae0 mm/filemap.c:1970 pagecache_get_page+0x2c/0x130 mm/folio-compat.c:87 f2fs_pagecache_get_page fs/f2fs/f2fs.h:2804 [inline] ra_data_block+0x674/0xb40 fs/f2fs/gc.c:1263 gc_data_segment fs/f2fs/gc.c:1627 [inline] do_garbage_collect+0x3b55/0x80e0 fs/f2fs/gc.c:1825 f2fs_gc+0xf3a/0x2f60 fs/f2fs/gc.c:1929 f2fs_balance_fs+0x5f1/0x810 fs/f2fs/segment.c:456 f2fs_write_single_data_page+0x12ed/0x1bd0 fs/f2fs/data.c:2896 f2fs_write_cache_pages fs/f2fs/data.c:3154 [inline] __f2fs_write_data_pages fs/f2fs/data.c:3309 [inline] f2fs_write_data_pages+0x1e03/0x3670 fs/f2fs/data.c:3336 do_writepages+0x35f/0x880 mm/page-writeback.c:2687 page last free pid 1037 tgid 1037 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe0d/0x10e0 mm/page_alloc.c:2660 fscrypt_finalize_bounce_page include/linux/fscrypt.h:1119 [inline] f2fs_write_end_io+0x3cd/0x9a0 fs/f2fs/data.c:335 blk_update_request+0x5e5/0x1160 block/blk-mq.c:983 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1145 loop_handle_cmd drivers/block/loop.c:1946 [inline] loop_process_work+0x1bc8/0x21c0 drivers/block/loop.c:1964 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 ------------[ cut here ]------------ kernel BUG at mm/filemap.c:1526! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 27 Comm: kworker/u4:2 Not tainted 6.14.0-rc1-syzkaller-00020-g0de63bb7d919 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: loop0 loop_workfn RIP: 0010:folio_end_read+0x239/0x240 mm/filemap.c:1526 Code: 4f c7 ff 4c 89 ef 48 c7 c6 e0 d3 13 8c e8 6f 64 11 00 90 0f 0b e8 c7 4f c7 ff 4c 89 ef 48 c7 c6 20 cc 13 8c e8 58 64 11 00 90 <0f> 0b 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc900004e73e8 EFLAGS: 00010246 RAX: df44434cf2d67900 RBX: 0000000000000008 RCX: 0000000000000001 RDX: dffffc0000000000 RSI: ffffffff8c0aa680 RDI: 0000000000000001 RBP: 0000000000000000 R08: ffffffff942f9947 R09: 1ffffffff285f328 R10: dffffc0000000000 R11: fffffbfff285f329 R12: ffffea0001601ac8 R13: ffffea0001601ac0 R14: 1ffffd40002c0359 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f716e9b0fe0 CR3: 0000000011832000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: f2fs_finish_read_bio+0x3bb/0x850 fs/f2fs/data.c:154 blk_update_request+0x5e5/0x1160 block/blk-mq.c:983 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1145 loop_handle_cmd drivers/block/loop.c:1946 [inline] loop_process_work+0x1bc8/0x21c0 drivers/block/loop.c:1964 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:folio_end_read+0x239/0x240 mm/filemap.c:1526 Code: 4f c7 ff 4c 89 ef 48 c7 c6 e0 d3 13 8c e8 6f 64 11 00 90 0f 0b e8 c7 4f c7 ff 4c 89 ef 48 c7 c6 20 cc 13 8c e8 58 64 11 00 90 <0f> 0b 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc900004e73e8 EFLAGS: 00010246 RAX: df44434cf2d67900 RBX: 0000000000000008 RCX: 0000000000000001 RDX: dffffc0000000000 RSI: ffffffff8c0aa680 RDI: 0000000000000001 RBP: 0000000000000000 R08: ffffffff942f9947 R09: 1ffffffff285f328 R10: dffffc0000000000 R11: fffffbfff285f329 R12: ffffea0001601ac8 R13: ffffea0001601ac0 R14: 1ffffd40002c0359 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f716e9b0fe0 CR3: 0000000043542000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 --- 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