From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) (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 BEA5934753F for ; Fri, 17 Apr 2026 16:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776442903; cv=none; b=DVNM01eT9IeZ2Q0RsVSq0d9OWehtLFQ0gUGhruPsg8jewEvrU4Pscs9xNqSXzOvbkTxCAmhA7FU8edt0Y3diGDqKLKllnTd85vEEpM0JVKHLCDYkjH4cO4KbgVKS9HixmJ/VgZaUUE8T2ZfCylO09cjqJ2PEjbu8jq1TXboRsKg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776442903; c=relaxed/simple; bh=BrConcCALZZpOmBuqwS9xS34j0Cg7CjHDe8zGSlMl1c=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=F3HZ1xgyAP8TImNdIlxsgT2BVHM4zrrtobxL5yn9bOp80vNUEeDE7jQZ2pip2GW4kC7jBKlpif1TGonC7uoarEqpgx+Ij5hCVn66z2c3KBxfP07AIxkP1ES2BwVflzxxhROMXwKPciws3vBt8pL4BSF71RWzp8TOSfFQtHdhHSw= 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.167.200 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-oi1-f200.google.com with SMTP id 5614622812f47-46335278e7bso3717137b6e.0 for ; Fri, 17 Apr 2026 09:21:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776442902; x=1777047702; 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=xMlmfsVk9W8MJn7P89KL8jSepm+NNTPZbf+NaowCrr8=; b=ZVhIb2TWO65F3HdRvF6hmxhN9r3y7Touxnj1RyvHbppgxL5+qdTarBIDmI0Hp/O3ng hs//Zyw7OpfIR3v3YxqpCo58CiZ68v5MOs0ayK4WsZMjGXv+pIjzSoIDnWV5GFjOHdvp OsBdbNAy1Fqmxrk7s/MqD1PjGrIa7GzhwVqmcMcMHCQduvJxxSDVxN/AxZF1T1/qqIAU fxdCmvVoqvPp4GwLAr3z8123pM6U0FZLPLi5LK02hxNgKbjeItgp72FpTp6K9T4e3DRG NXhWRxxnqnM5C+O/tQulyJNEvWBZySKI+mpiv6wQEajXSleT/7Nj1P06qUkzwLgO21Gu Ir6w== X-Gm-Message-State: AOJu0YxKLEvrDhNvKAkkFIypXrYc03LB+P/K/MgL+ms0sAuKx8gKBc8Z ChYjrShWFreMjTTxNLTach+GNlJRHDwzyLkXSs01VGQ8DzIuLVTC/Z1iSpRe4rTDx+MXJqli0OD 9b1aojOR926gjYuLd3+lb//ZRrPRogv4FT+3qWBCFSYzz1mpOv3ksPr4VhL8= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a4a:b4c8:0:b0:689:30ab:84e2 with SMTP id 006d021491bc7-694636aeaf5mr1020340eaf.6.1776442901847; Fri, 17 Apr 2026 09:21:41 -0700 (PDT) Date: Fri, 17 Apr 2026 09:21:41 -0700 In-Reply-To: <001a11c1461c14bf9e0568fd0cd6@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69e25e15.a00a0220.1bd0ca.000d.GAE@google.com> Subject: Forwarded: Re: [syzbot] WARNING in hfs_bnode_create From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: Re: [syzbot] WARNING in hfs_bnode_create Author: tristmd@gmail.com #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >>From 89ec6a61f81d25f4bf256b4747be2dec6a36627a Mon Sep 17 00:00:00 2001 From: Tristan Madani Date: Fri, 17 Apr 2026 16:15:20 +0000 Subject: [PATCH] hfs: return error when bnode already hashed in hfs_bnode_create() hfs_bnode_create() uses WARN_ON(1) and returns the existing node when a bnode is already hashed. On corrupted filesystems this triggers repeated kernel WARNINGs. Replace with ERR_PTR(-EIO) to properly signal the error to callers. Reported-by: syzbot+a19ca73b21fe8bc69101@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a19ca73b21fe8bc69101 Signed-off-by: Tristan Madani --- fs/hfs/bnode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c index 13d58c5..255db8e 100644 --- a/fs/hfs/bnode.c +++ b/fs/hfs/bnode.c @@ -517,8 +517,7 @@ struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num) spin_unlock(&tree->hash_lock); if (node) { pr_crit("new node %u already hashed?\n", num); - WARN_ON(1); - return node; + return ERR_PTR(-EIO); } node = __hfs_bnode_create(tree, num); if (!node) -- 2.47.3