All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [ocfs2?] BUG: unable to handle kernel paging request in ocfs2_unlock_and_free_folios
@ 2025-06-15 17:07 syzbot
  2025-06-15 19:20 ` [External] : " Mark Tinguely
  2025-06-16  1:31 ` [PATCH] ocfs2: reset folio to NULL when get folio fails Lizhi Xu
  0 siblings, 2 replies; 5+ messages in thread
From: syzbot @ 2025-06-15 17:07 UTC (permalink / raw)
  To: jlbec, joseph.qi, linux-kernel, mark, ocfs2-devel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    2c4a1f3fe03e Merge tag 'bpf-fixes' of git://git.kernel.org..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1422ee0c580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=c07f08ee4bcfb276
dashboard link: https://syzkaller.appspot.com/bug?extid=c2ea94ae47cd7e3881ec
compiler:       Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13ede60c580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15aab682580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-2c4a1f3f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/fe90e2ba373e/vmlinux-2c4a1f3f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/fdd4ddecb119/bzImage-2c4a1f3f.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/77e1eb294850/mount_0.gz
  fsck result: OK (log: https://syzkaller.appspot.com/x/fsck.log?x=1727a10c580000)

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+c2ea94ae47cd7e3881ec@syzkaller.appspotmail.com

R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000180
R13: 00007ffd0a9a15d0 R14: 431bde82d7b634db R15: 00007f06760c301d
 </TASK>
(syz-executor335,5312,0):ocfs2_grab_folios_for_write:1073 ERROR: status = -12
(syz-executor335,5312,0):ocfs2_write_begin_nolock:1791 ERROR: status = -12
BUG: unable to handle page fault for address: fffffffffffffffc
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD df3d067 P4D df3d067 PUD df3f067 PMD 0 
Oops: Oops: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5312 Comm: syz-executor335 Not tainted 6.16.0-rc1-syzkaller-00010-g2c4a1f3fe03e #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:const_folio_flags include/linux/page-flags.h:347 [inline]
RIP: 0010:folio_test_locked include/linux/page-flags.h:547 [inline]
RIP: 0010:folio_unlock+0x3a/0x160 mm/filemap.c:1498
Code: fb 49 bf 00 00 00 00 00 fc ff df e8 20 df c8 ff 4c 8d 73 08 4d 89 f4 49 c1 ec 03 43 80 3c 3c 00 74 08 4c 89 f7 e8 76 56 2c 00 <4d> 8b 2e 4c 89 ee 48 83 e6 01 31 ff e8 d5 e3 c8 ff 49 83 e5 01 0f
RSP: 0018:ffffc9000d517128 EFLAGS: 00010246
RAX: ffffffff81f77fd0 RBX: fffffffffffffff4 RCX: ffff8880007fc880
RDX: 0000000000000000 RSI: 0000000000000001 RDI: fffffffffffffff4
RBP: 0000000000000001 R08: ffff88803fedc07f R09: 1ffff11007fdb80f
R10: dffffc0000000000 R11: ffffed1007fdb810 R12: 1fffffffffffffff
R13: 0000000000000000 R14: fffffffffffffffc R15: dffffc0000000000
FS:  000055557d696380(0000) GS:ffff88808d252000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffffc CR3: 0000000042b50000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ocfs2_unlock_and_free_folios+0x71/0x1a0 fs/ocfs2/aops.c:765
 ocfs2_free_write_ctxt fs/ocfs2/aops.c:813 [inline]
 ocfs2_write_begin_nolock+0x3078/0x4340 fs/ocfs2/aops.c:1830
 ocfs2_write_begin+0x1bb/0x310 fs/ocfs2/aops.c:1882
 generic_perform_write+0x2c4/0x910 mm/filemap.c:4112
 ocfs2_file_write_iter+0x157a/0x1d10 fs/ocfs2/file.c:2469
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x548/0xa90 fs/read_write.c:686
 ksys_write+0x145/0x250 fs/read_write.c:738
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0676081af9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 1a 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd0a9a1498 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007ffd0a9a14c0 RCX: 00007f0676081af9
RDX: 00000000fffffec6 RSI: 0000200000000180 RDI: 0000000000000005
RBP: 0000000000000001 R08: 00007ffd0a9a1237 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000180
R13: 00007ffd0a9a15d0 R14: 431bde82d7b634db R15: 00007f06760c301d
 </TASK>
Modules linked in:
CR2: fffffffffffffffc
---[ end trace 0000000000000000 ]---
RIP: 0010:const_folio_flags include/linux/page-flags.h:347 [inline]
RIP: 0010:folio_test_locked include/linux/page-flags.h:547 [inline]
RIP: 0010:folio_unlock+0x3a/0x160 mm/filemap.c:1498
Code: fb 49 bf 00 00 00 00 00 fc ff df e8 20 df c8 ff 4c 8d 73 08 4d 89 f4 49 c1 ec 03 43 80 3c 3c 00 74 08 4c 89 f7 e8 76 56 2c 00 <4d> 8b 2e 4c 89 ee 48 83 e6 01 31 ff e8 d5 e3 c8 ff 49 83 e5 01 0f
RSP: 0018:ffffc9000d517128 EFLAGS: 00010246
RAX: ffffffff81f77fd0 RBX: fffffffffffffff4 RCX: ffff8880007fc880
RDX: 0000000000000000 RSI: 0000000000000001 RDI: fffffffffffffff4
RBP: 0000000000000001 R08: ffff88803fedc07f R09: 1ffff11007fdb80f
R10: dffffc0000000000 R11: ffffed1007fdb810 R12: 1fffffffffffffff
R13: 0000000000000000 R14: fffffffffffffffc R15: dffffc0000000000
FS:  000055557d696380(0000) GS:ffff88808d252000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffffc CR3: 0000000042b50000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	fb                   	sti
   1:	49 bf 00 00 00 00 00 	movabs $0xdffffc0000000000,%r15
   8:	fc ff df
   b:	e8 20 df c8 ff       	call   0xffc8df30
  10:	4c 8d 73 08          	lea    0x8(%rbx),%r14
  14:	4d 89 f4             	mov    %r14,%r12
  17:	49 c1 ec 03          	shr    $0x3,%r12
  1b:	43 80 3c 3c 00       	cmpb   $0x0,(%r12,%r15,1)
  20:	74 08                	je     0x2a
  22:	4c 89 f7             	mov    %r14,%rdi
  25:	e8 76 56 2c 00       	call   0x2c56a0
* 2a:	4d 8b 2e             	mov    (%r14),%r13 <-- trapping instruction
  2d:	4c 89 ee             	mov    %r13,%rsi
  30:	48 83 e6 01          	and    $0x1,%rsi
  34:	31 ff                	xor    %edi,%edi
  36:	e8 d5 e3 c8 ff       	call   0xffc8e410
  3b:	49 83 e5 01          	and    $0x1,%r13
  3f:	0f                   	.byte 0xf


---
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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [External] : [syzbot] [ocfs2?] BUG: unable to handle kernel paging request in ocfs2_unlock_and_free_folios
  2025-06-15 17:07 [syzbot] [ocfs2?] BUG: unable to handle kernel paging request in ocfs2_unlock_and_free_folios syzbot
@ 2025-06-15 19:20 ` Mark Tinguely
  2025-06-16 14:39   ` Mark Tinguely
  2025-06-16  1:31 ` [PATCH] ocfs2: reset folio to NULL when get folio fails Lizhi Xu
  1 sibling, 1 reply; 5+ messages in thread
From: Mark Tinguely @ 2025-06-15 19:20 UTC (permalink / raw)
  To: syzbot, jlbec, joseph.qi, linux-kernel, mark, ocfs2-devel,
	syzkaller-bugs

On 6/15/25 12:07 PM, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    2c4a1f3fe03e Merge tag 'bpf-fixes' of git://git.kernel.org..
> git tree:       upstream
> console output: https://urldefense.com/v3/__https://syzkaller.appspot.com/x/log.txt?x=1422ee0c580000__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6pUpt9V_Q$
> kernel config:  https://urldefense.com/v3/__https://syzkaller.appspot.com/x/.config?x=c07f08ee4bcfb276__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6pSK8uLXU$
> dashboard link: https://urldefense.com/v3/__https://syzkaller.appspot.com/bug?extid=c2ea94ae47cd7e3881ec__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6ph-u8j00$
> compiler:       Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
> syz repro:      https://urldefense.com/v3/__https://syzkaller.appspot.com/x/repro.syz?x=13ede60c580000__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6prbA_nYw$
> C reproducer:   https://urldefense.com/v3/__https://syzkaller.appspot.com/x/repro.c?x=15aab682580000__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6pYMulSYo$
> 
> Downloadable assets:
> disk image (non-bootable): https://urldefense.com/v3/__https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-2c4a1f3f.raw.xz__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6pe3aDXaI$
> vmlinux: https://urldefense.com/v3/__https://storage.googleapis.com/syzbot-assets/fe90e2ba373e/vmlinux-2c4a1f3f.xz__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6pfEFNVhk$
> kernel image: https://urldefense.com/v3/__https://storage.googleapis.com/syzbot-assets/fdd4ddecb119/bzImage-2c4a1f3f.xz__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6pdmAa8Bs$
> mounted in repro: https://urldefense.com/v3/__https://storage.googleapis.com/syzbot-assets/77e1eb294850/mount_0.gz__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6p9rdG3dc$
>    fsck result: OK (log: https://urldefense.com/v3/__https://syzkaller.appspot.com/x/fsck.log?x=1727a10c580000__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6p3yBr4Vk$ )
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+c2ea94ae47cd7e3881ec@syzkaller.appspotmail.com
> 
> R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000180
> R13: 00007ffd0a9a15d0 R14: 431bde82d7b634db R15: 00007f06760c301d
>   </TASK>
> (syz-executor335,5312,0):ocfs2_grab_folios_for_write:1073 ERROR: status = -12
> (syz-executor335,5312,0):ocfs2_write_begin_nolock:1791 ERROR: status = -12
> BUG: unable to handle page fault for address: fffffffffffffffc
> #PF: supervisor read access in kernel mode
> #PF: error_code(0x0000) - not-present page
> PGD df3d067 P4D df3d067 PUD df3f067 PMD 0
> Oops: Oops: 0000 [#1] SMP KASAN NOPTI
> CPU: 0 UID: 0 PID: 5312 Comm: syz-executor335 Not tainted 6.16.0-rc1-syzkaller-00010-g2c4a1f3fe03e #0 PREEMPT(full)
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
> RIP: 0010:const_folio_flags include/linux/page-flags.h:347 [inline]
> RIP: 0010:folio_test_locked include/linux/page-flags.h:547 [inline]
> RIP: 0010:folio_unlock+0x3a/0x160 mm/filemap.c:1498
> Code: fb 49 bf 00 00 00 00 00 fc ff df e8 20 df c8 ff 4c 8d 73 08 4d 89 f4 49 c1 ec 03 43 80 3c 3c 00 74 08 4c 89 f7 e8 76 56 2c 00 <4d> 8b 2e 4c 89 ee 48 83 e6 01 31 ff e8 d5 e3 c8 ff 49 83 e5 01 0f
> RSP: 0018:ffffc9000d517128 EFLAGS: 00010246
> RAX: ffffffff81f77fd0 RBX: fffffffffffffff4 RCX: ffff8880007fc880
> RDX: 0000000000000000 RSI: 0000000000000001 RDI: fffffffffffffff4
> RBP: 0000000000000001 R08: ffff88803fedc07f R09: 1ffff11007fdb80f
> R10: dffffc0000000000 R11: ffffed1007fdb810 R12: 1fffffffffffffff
> R13: 0000000000000000 R14: fffffffffffffffc R15: dffffc0000000000
> FS:  000055557d696380(0000) GS:ffff88808d252000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: fffffffffffffffc CR3: 0000000042b50000 CR4: 0000000000352ef0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
>   <TASK>
>   ocfs2_unlock_and_free_folios+0x71/0x1a0 fs/ocfs2/aops.c:765
>   ocfs2_free_write_ctxt fs/ocfs2/aops.c:813 [inline]
>   ocfs2_write_begin_nolock+0x3078/0x4340 fs/ocfs2/aops.c:1830
>   ocfs2_write_begin+0x1bb/0x310 fs/ocfs2/aops.c:1882
>   generic_perform_write+0x2c4/0x910 mm/filemap.c:4112
>   ocfs2_file_write_iter+0x157a/0x1d10 fs/ocfs2/file.c:2469
>   new_sync_write fs/read_write.c:593 [inline]
>   vfs_write+0x548/0xa90 fs/read_write.c:686
>   ksys_write+0x145/0x250 fs/read_write.c:738
>   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
>   do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
>   entry_SYSCALL_64_after_hwframe+0x77/0x7f
> RIP: 0033:0x7f0676081af9
> Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 1a 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007ffd0a9a1498 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
> RAX: ffffffffffffffda RBX: 00007ffd0a9a14c0 RCX: 00007f0676081af9
> RDX: 00000000fffffec6 RSI: 0000200000000180 RDI: 0000000000000005
> RBP: 0000000000000001 R08: 00007ffd0a9a1237 R09: 0000000000000000
> R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000180
> R13: 00007ffd0a9a15d0 R14: 431bde82d7b634db R15: 00007f06760c301d
>   </TASK>
> Modules linked in:
> CR2: fffffffffffffffc
> ---[ end trace 0000000000000000 ]---
> RIP: 0010:const_folio_flags include/linux/page-flags.h:347 [inline]
> RIP: 0010:folio_test_locked include/linux/page-flags.h:547 [inline]
> RIP: 0010:folio_unlock+0x3a/0x160 mm/filemap.c:1498
> Code: fb 49 bf 00 00 00 00 00 fc ff df e8 20 df c8 ff 4c 8d 73 08 4d 89 f4 49 c1 ec 03 43 80 3c 3c 00 74 08 4c 89 f7 e8 76 56 2c 00 <4d> 8b 2e 4c 89 ee 48 83 e6 01 31 ff e8 d5 e3 c8 ff 49 83 e5 01 0f
> RSP: 0018:ffffc9000d517128 EFLAGS: 00010246
> RAX: ffffffff81f77fd0 RBX: fffffffffffffff4 RCX: ffff8880007fc880
> RDX: 0000000000000000 RSI: 0000000000000001 RDI: fffffffffffffff4
> RBP: 0000000000000001 R08: ffff88803fedc07f R09: 1ffff11007fdb80f
> R10: dffffc0000000000 R11: ffffed1007fdb810 R12: 1fffffffffffffff
> R13: 0000000000000000 R14: fffffffffffffffc R15: dffffc0000000000
> FS:  000055557d696380(0000) GS:ffff88808d252000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: fffffffffffffffc CR3: 0000000042b50000 CR4: 0000000000352ef0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> ----------------
> Code disassembly (best guess):
>     0:	fb                   	sti
>     1:	49 bf 00 00 00 00 00 	movabs $0xdffffc0000000000,%r15
>     8:	fc ff df
>     b:	e8 20 df c8 ff       	call   0xffc8df30
>    10:	4c 8d 73 08          	lea    0x8(%rbx),%r14
>    14:	4d 89 f4             	mov    %r14,%r12
>    17:	49 c1 ec 03          	shr    $0x3,%r12
>    1b:	43 80 3c 3c 00       	cmpb   $0x0,(%r12,%r15,1)
>    20:	74 08                	je     0x2a
>    22:	4c 89 f7             	mov    %r14,%rdi
>    25:	e8 76 56 2c 00       	call   0x2c56a0
> * 2a:	4d 8b 2e             	mov    (%r14),%r13 <-- trapping instruction
>    2d:	4c 89 ee             	mov    %r13,%rsi
>    30:	48 83 e6 01          	and    $0x1,%rsi
>    34:	31 ff                	xor    %edi,%edi
>    36:	e8 d5 e3 c8 ff       	call   0xffc8e410
>    3b:	49 83 e5 01          	and    $0x1,%r13
>    3f:	0f                   	.byte 0xf
> 
> 
> ---
> This report is generated by a bot. It may contain errors.
> See https://urldefense.com/v3/__https://goo.gl/tpsmEJ__;!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6pBY5u_TI$  for more information about syzbot.
> syzbot engineers can be reached at syzkaller@googlegroups.com.
> 
> syzbot will keep track of this issue. See:
> https://urldefense.com/v3/__https://goo.gl/tpsmEJ*status__;Iw!!ACWV5N9M2RV99hQ!IgPSRxGUkIu81wjsrs1PEjg5XahZ6OCaEoVrFRGDQrtH2p3MFwalunoQnIXLF9PV2BUrFoNF-jydeFr8sJBdFnQ_9kMI9FNTCl6p8sdCeN0$  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 syzbot to run the reproducer, reply with:
> #syz test: git://repo/address.git branch-or-commit-hash
> If you attach or paste a git patch, syzbot will apply it before testing.
> 
> 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
> 


Only half of the following patch was committed:

  https://lore.kernel.org/ocfs2-devel/925336b7-b62c-49e6-aa97-e9a417374a6f@oracle.com/T/#t

Should the ocfs2_grab_folios()half be reposted?

--Mark Tinguely

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ocfs2: reset folio to NULL when get folio fails
  2025-06-15 17:07 [syzbot] [ocfs2?] BUG: unable to handle kernel paging request in ocfs2_unlock_and_free_folios syzbot
  2025-06-15 19:20 ` [External] : " Mark Tinguely
@ 2025-06-16  1:31 ` Lizhi Xu
  2025-06-17  3:45   ` Joseph Qi
  1 sibling, 1 reply; 5+ messages in thread
From: Lizhi Xu @ 2025-06-16  1:31 UTC (permalink / raw)
  To: syzbot+c2ea94ae47cd7e3881ec
  Cc: jlbec, joseph.qi, linux-kernel, mark, ocfs2-devel, syzkaller-bugs

The reproducer uses FAULT_INJECTION to make memory allocation fail, which
causes __filemap_get_folio() to fail, when initializing w_folios[i] in
ocfs2_grab_folios_for_write(), it only returns an error code and the value
of w_folios[i] is the error code, which causes ocfs2_unlock_and_free_folios()
to recycle the invalid w_folios[i] when releasing folios.

Reported-by: syzbot+c2ea94ae47cd7e3881ec@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=c2ea94ae47cd7e3881ec
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
---
 fs/ocfs2/aops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 40b6bce12951..89aadc6cdd87 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1071,6 +1071,7 @@ static int ocfs2_grab_folios_for_write(struct address_space *mapping,
 			if (IS_ERR(wc->w_folios[i])) {
 				ret = PTR_ERR(wc->w_folios[i]);
 				mlog_errno(ret);
+				wc->w_folios[i] = NULL;
 				goto out;
 			}
 		}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [External] : [syzbot] [ocfs2?] BUG: unable to handle kernel paging request in ocfs2_unlock_and_free_folios
  2025-06-15 19:20 ` [External] : " Mark Tinguely
@ 2025-06-16 14:39   ` Mark Tinguely
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Tinguely @ 2025-06-16 14:39 UTC (permalink / raw)
  To: syzbot, jlbec, joseph.qi, linux-kernel, mark, ocfs2-devel,
	syzkaller-bugs

 > The reproducer uses FAULT_INJECTION to make memory allocation fail, which
 > causes __filemap_get_folio() to fail, when initializing w_folios[i] in
 > ocfs2_grab_folios_for_write(), it only returns an error code and the 
value
 > of w_folios[i] is the error code, which causes 
ocfs2_unlock_and_free_folios()
 > to recycle the invalid w_folios[i] when releasing folios.
 >
 > Reported-by: syzbot+c2ea94ae47cd7e3881ec@syzkaller.appspotmail.com
 > Closes: https://syzkaller.appspot.com/bug?extid=c2ea94ae47cd7e3881ec
 > Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
 > ---
 >  fs/ocfs2/aops.c | 1 +
 >  1 file changed, 1 insertion(+)
 >
 > diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
 > index 40b6bce12951..89aadc6cdd87 100644
 > --- a/fs/ocfs2/aops.c
 > +++ b/fs/ocfs2/aops.c
 > @@ -1071,6 +1071,7 @@ static int ocfs2_grab_folios_for_write(struct 
address_space *mapping,
 >  			if (IS_ERR(wc->w_folios[i])) {
 >  				ret = PTR_ERR(wc->w_folios[i]);
 >  				mlog_errno(ret);
 > +				wc->w_folios[i] = NULL;
 >  				goto out;
 >  			}
 >  		}
 > --
 > 2.43.0

sorry for the cut and paste reply. My email system rejected and bounced 
the original email.

ACKed-by: Mark Tinguely <mark.tinguely@oracle.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ocfs2: reset folio to NULL when get folio fails
  2025-06-16  1:31 ` [PATCH] ocfs2: reset folio to NULL when get folio fails Lizhi Xu
@ 2025-06-17  3:45   ` Joseph Qi
  0 siblings, 0 replies; 5+ messages in thread
From: Joseph Qi @ 2025-06-17  3:45 UTC (permalink / raw)
  To: Lizhi Xu, syzbot+c2ea94ae47cd7e3881ec, akpm
  Cc: jlbec, linux-kernel, mark, ocfs2-devel, syzkaller-bugs



On 2025/6/16 09:31, Lizhi Xu wrote:
> The reproducer uses FAULT_INJECTION to make memory allocation fail, which
> causes __filemap_get_folio() to fail, when initializing w_folios[i] in
> ocfs2_grab_folios_for_write(), it only returns an error code and the value
> of w_folios[i] is the error code, which causes ocfs2_unlock_and_free_folios()
> to recycle the invalid w_folios[i] when releasing folios.
> 
> Reported-by: syzbot+c2ea94ae47cd7e3881ec@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=c2ea94ae47cd7e3881ec
> Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>

Looks good.
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>

> ---
>  fs/ocfs2/aops.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
> index 40b6bce12951..89aadc6cdd87 100644
> --- a/fs/ocfs2/aops.c
> +++ b/fs/ocfs2/aops.c
> @@ -1071,6 +1071,7 @@ static int ocfs2_grab_folios_for_write(struct address_space *mapping,
>  			if (IS_ERR(wc->w_folios[i])) {
>  				ret = PTR_ERR(wc->w_folios[i]);
>  				mlog_errno(ret);
> +				wc->w_folios[i] = NULL;
>  				goto out;
>  			}
>  		}


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-17  3:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-15 17:07 [syzbot] [ocfs2?] BUG: unable to handle kernel paging request in ocfs2_unlock_and_free_folios syzbot
2025-06-15 19:20 ` [External] : " Mark Tinguely
2025-06-16 14:39   ` Mark Tinguely
2025-06-16  1:31 ` [PATCH] ocfs2: reset folio to NULL when get folio fails Lizhi Xu
2025-06-17  3:45   ` Joseph Qi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.