public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [syzbot] kernel BUG in ocfs2_xattr_extend_allocation
       [not found] <177644288492.3790412.4666541082447192776@talencesecurity.com>
@ 2026-04-17 16:21 ` syzbot
  0 siblings, 0 replies; only message in thread
From: syzbot @ 2026-04-17 16:21 UTC (permalink / raw)
  To: tristmd; +Cc: tristmd, linux-kernel, syzkaller-bugs

> #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

This crash does not have a reproducer. I cannot test it.

>>From 6a4d8a90cdc507e6cc43ee122be836e3ff19d2c9 Mon Sep 17 00:00:00 2001
> From: Tristan Madani <tristan@talencesecurity.com>
> Date: Fri, 17 Apr 2026 16:15:19 +0000
> Subject: [PATCH] ocfs2: handle RESTART_META gracefully in
>  ocfs2_xattr_extend_allocation()
> ocfs2_xattr_extend_allocation() uses BUG_ON(why == RESTART_META)
> when the allocator returns RESTART_META. On corrupted filesystems,
> this triggers a kernel panic. Replace with -EIO error return.
> Reported-by: syzbot+e538032956b1157914a3@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=e538032956b1157914a3
> Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
> ---
>  fs/ocfs2/xattr.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
> index 86cfd4c..7dea9e9 100644
> --- a/fs/ocfs2/xattr.c
> +++ b/fs/ocfs2/xattr.c
> @@ -744,7 +744,11 @@ static int ocfs2_xattr_extend_allocation(struct inode *inode,
>  			 * We can only fail in case the alloc file doesn't give
>  			 * up enough clusters.
>  			 */
> -			BUG_ON(why == RESTART_META);
> +			if (why == RESTART_META) {
> +				status = -EIO;
> +				mlog_errno(status);
> +				break;
> +			}
>  
>  			credits = ocfs2_calc_extend_credits(inode->i_sb,
>  							    &vb->vb_xv->xr_list);
> -- 
> 2.47.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-17 16:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <177644288492.3790412.4666541082447192776@talencesecurity.com>
2026-04-17 16:21 ` [syzbot] kernel BUG in ocfs2_xattr_extend_allocation syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox