From nobody Mon Apr 6 16:20:15 2026 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.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 DC5A33A6408 for ; Thu, 19 Mar 2026 07:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773907136; cv=none; b=a9aCnItGe4VtGIkPYuqETJ9KrgB1LyKHX/YJVqs3nZa3pIw662a2eFK1NMNYASAPW6DTnq6FyU4XsEOPEJ1sEFwncozfxyLVLiTqwzEowuWZ+2dfoYfP0SK4s0iZZ9gpxU+i6D8EZLDqW+Sq7LEfjlWUHXWKX65jZg/Ink1rebA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773907136; c=relaxed/simple; bh=5giymIpuS98B1nat6Jd8/P4uXsZq5xKSlHzy7eNSPvE=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=eDSlWu8r3FTvCepgn+2JfUaYhiQDIBapTIZqKYibxBwKZbasfeWcg5S1J+RgT8u8558ABiVOt3PGEJ5SAlqRFDPbl14A2PSF1vF0EbdJzsuLEtsDjyGcTkv/L8R6dVnISziMEAvi1if0z6a6CBkKgGz7jGaIbUpSj6n9sWS604s= 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.161.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-oo1-f71.google.com with SMTP id 006d021491bc7-67c0d7d179eso7346312eaf.1 for ; Thu, 19 Mar 2026 00:58:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773907134; x=1774511934; 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=TIRuP8CJh0+Bkc1dKa3bJF6HT8YM+O8qW5anqW1v3yQ=; b=j0wk8sIVGmpeyYqjUuWn627+u4nGv6B5jETW09H2y+WZ2SqAehEA7yKmEIHZxB98S0 PGLyjYhpcyvv0ct0x3Ki/Q4nCKdXIXA+8ZvmWsPtiPipL+N43mzjvga0EOz5OBAoOzBx pbfU4sGWDeLcGaZwZl/7ze3cSYjlNzzHVEdprX4SESbc49HvLkaUPW37S9zKmIezDJ/D m4liBOjNN8ilxxCcp0tHCCrGfnttspEVSCGduZ0l/VZfpFyx7XSBnRAeZ9sCnJB5cS0V Js+PEuH6ivJ8+e9WnElAL9fQ3Rl+N2zs8Sv/Mcvv/XzgTyVUCbDlE6dzzCY4NbpM5eig Jdew== X-Gm-Message-State: AOJu0YwS9r1pKj6RG0t9RQ4UPHVZMlhVCtJid/RMMWfTwKDZHmGmhenA L2Q7ji4wwGPb2bcD5/OAs0DjIgpn4Hp9oLOxjIM7jFh4p21XqAHsAbcFhIXOZuIQ0WiniAX0QAY Hje1fEqwc/WUsAYcdYhMZO6yCipt6vBGDn9iUNu58PABggLGcCHQ8sotDY9Q= 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:4687:b0:67b:a702:a077 with SMTP id 006d021491bc7-67c0dafa308mr3510580eaf.34.1773907133895; Thu, 19 Mar 2026 00:58:53 -0700 (PDT) Date: Thu, 19 Mar 2026 00:58:53 -0700 In-Reply-To: <69bba3ff.050a0220.227207.0031.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69bbacbd.050a0220.3a088d.000d.GAE@google.com> Subject: Forwarded: [PATCH] nilfs2: fix missing continue after -ENOENT in nilfs_ioctl_mark_blocks_dirty() From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable 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: [PATCH] nilfs2: fix missing continue after -ENOENT in nilfs_ioctl_= mark_blocks_dirty() Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git= master nilfs_ioctl_mark_blocks_dirty() calls nilfs_bmap_lookup_at_level() to get the current block number of each block descriptor. When the lookup returns -ENOENT, meaning the block does not exist, it sets bd_blocknr to 0 and continues processing. However, if bd_oblocknr is also 0, the subsequent check: if (bdescs[i].bd_blocknr !=3D bdescs[i].bd_oblocknr) continue; will not skip the block, and nilfs_bmap_mark() will be called on a non-existent block. This causes nilfs_btree_do_lookup() to return -ENOENT, triggering the WARN_ON(ret =3D=3D -ENOENT). Fix this by adding a continue statement after setting bd_blocknr to 0 when the lookup returns -ENOENT, so that dead blocks are always skipped regardless of the value of bd_oblocknr. Fixes: 7942b919f732 ("nilfs2: ioctl operations") Reported-by: syzbot+98a040252119df0506f8@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=3D98a040252119df0506f8 Signed-off-by: Deepanshu Kartikey --- fs/nilfs2/ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index e17b8da66491..1615a314f557 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c @@ -745,6 +745,7 @@ static int nilfs_ioctl_mark_blocks_dirty(struct the_nil= fs *nilfs, if (ret !=3D -ENOENT) return ret; bdescs[i].bd_blocknr =3D 0; + continue; } if (bdescs[i].bd_blocknr !=3D bdescs[i].bd_oblocknr) /* skip dead block */ --=20 2.43.0