From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.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 975F43B5318 for ; Fri, 17 Apr 2026 10:12:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.71 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776420754; cv=none; b=SPovQ/NeJARaQqO61431LJQ+d1RpBBa6nP5qlFXHhcuF0eJRlwxwwWW0A0pOn36sdr4ffl/5Vt/na86kxLrgp6A/9qSix49mhRWqHdpI925FLSbPWUeQPN/ubCip/6eWfkraVNVxkVzCYo13TQ4xc1zqFm2NAQN0XEbzlqLqWF0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776420754; c=relaxed/simple; bh=lKIVNfytA1RAWFiotXcL5p1k8DRC22q3lu57gv7GKMQ=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:Cc: Content-Type; b=JCLpufkY9RLUaCN8KznF3dMQaoyKXOwvOTw7dzmdj3Zsvp2jncIsPFwqj/WZflrt2ImCrlyhBJ751RITx5tjaEHNPx1OZo3iNs7GpXU7XjjUPbtQ/COmW3quA4XYj09GwztK0NIxIGknqLMDKlqlVqBQ/CdycWDzoLfjGtCIMNg= 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.210.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-ot1-f71.google.com with SMTP id 46e09a7af769-7dbc42acec0so481732a34.2 for ; Fri, 17 Apr 2026 03:12:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776420752; x=1777025552; h=cc: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=1zpceN1/8NqRcTaPsxqFsehgCydD488EUKqIocZKmTU=; b=Q9QuyIhl/yzO3UhIk8r8Ok6VGfoOU9DpmAMqRLzDiLLmDuUcq6q7lGDR/4l8gieH+H 9sjoEogribZqv5tfdSkPQTf0HxEWP9X7zpE/Xn5iyXnVE9XBYSOyKett0fJKEVYLtG+O UGVeQm05vJf2LvirE3y8BwGVTkGli/LNjnAlp9YzVNm0ZIIsHi49EhfV7PSWYHv4nDLv YvNw/BR85w+52q0sDbKlq+k9dDAIUu+n2qHdkHeW2jIGLqBjGWgvEI2lTZmZgO63vHTn MAAEV0ObHrXo3FWpGVS137OSGMqqGkm7TgcSElPeaUByFl72e/7XGYlQ0QRXNu8qdR54 VF0w== X-Forwarded-Encrypted: i=1; AFNElJ8XMNbQE3OoYxQL/6a5rOFm8Fzcs1oHYCdS25bbmvPVKezDJ9j3WcG3FCWPJXGEWSv3KLanBXPXw/nz9Ss=@vger.kernel.org X-Gm-Message-State: AOJu0Yw8IHVcvb68oIStXAaTUMqJq8U0B5kQDKd1RcGtYnGKZnI37uW5 GsniGqSVIQyi5Z1kYOeDxOGxj9/Cr0V7L6RaY6cxU+MHbPcVR+teUF5EFhzZLoOlcOPkfyWJZYc 6YbZ6YeXgXYy/rtH27UI0IsgYI3L2oCxEG7qj0mKAHs4PedgYWvAWy001w+0= 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:6820:824:b0:683:99ad:33fd with SMTP id 006d021491bc7-69462f1926amr1047866eaf.42.1776420752689; Fri, 17 Apr 2026 03:12:32 -0700 (PDT) Date: Fri, 17 Apr 2026 03:12:32 -0700 In-Reply-To: <20260417101230.2491138-1-tristmd@gmail.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69e20790.050a0220.1de265.0010.GAE@google.com> Subject: Re: [PATCH] ocfs2: handle RESTART_META gracefully in From: syzbot To: tristmd@gmail.com Cc: tristmd@gmail.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" > From: Tristan Madani > > #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. > > ocfs2_xattr_extend_allocation > > ocfs2_xattr_extend_allocation() contains: > > BUG_ON(why == RESTART_META); > > under the assumption that a metadata-driven allocation restart cannot > happen for xattr value extents. However, on corrupted filesystem > images this assumption does not hold, and the BUG_ON crashes the > kernel. > > Replace the BUG_ON with a graceful error return. This lets the > filesystem report corruption via -EIO rather than panicking. > > Reported-by: syzbot+e538032956b1157914a3@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=e538032956b1157914a3 > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Cc: stable@vger.kernel.org > Signed-off-by: Tristan Madani > --- > fs/ocfs2/xattr.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c > index XXXXXXX..XXXXXXX 100644 > --- a/fs/ocfs2/xattr.c > +++ b/fs/ocfs2/xattr.c > @@ -744,8 +744,12 @@ 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.43.0