From nobody Mon Apr 6 14:08:41 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 9F06E33C51D for ; Thu, 19 Mar 2026 08:49:52 +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=1773910195; cv=none; b=XFeoeyctSBQ5R0dyNLN3PY99gpvCf7CZw2lbcpRcDVydp6cd1rriYrFhV+XHNmwae/aClCoBYh22HuIX6kipUZk3bTs0s7aAcTac5bZQWVtsNLjUYv568VSNbfvqhA99Dsov6SipTCosxiraUK1MsOrWMM668f1MWxcK5W5+UkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773910195; c=relaxed/simple; bh=5giymIpuS98B1nat6Jd8/P4uXsZq5xKSlHzy7eNSPvE=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=fLK2xS+5vTeZ1RfmDUueb7ZngpMOALubmWoqAZRGoVI3WVjx9e/XfXg1rnQO7+DKE8qCaGJ+gdLBGf56dpsfXM7D7Vt+eIMbM+jYPt1KcV6WhvIij4hekGHjbwvue9gzaAFedSrH0Kp7Z+fJGAJo0nAu0MAX7glGvB2BHKQUnHA= 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-67baeba7a53so23183307eaf.0 for ; Thu, 19 Mar 2026 01:49:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773910191; x=1774514991; 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=OpYvpUWTPIcvHS17Es91qWMTJ5cV+bKMApZ0AXc/YXFgUvnr7pshxc8pf/4MF9vAgM wegbqnAMWhmlg653RXb59xppZ8Eq365dKuRPe/a/3vWi7yX24gQYEiBJ/7sE1I7TqgRp gCGq497QF40gZz+RLqYiHkl8fPHWqmzqVAjE9++RPgE+zbVCVs03ccJeNQcjjRCPd82P EGd8r9j2pw3xcv6l+7cRenE+Ed6oUxdtw4mrvGbf4/CPyhOEqQube8wM7oFZa67G+VRc xoomZQTIsl36Ghe1YIxJIlxiBTe3hUVeUydpsUd316M9xHPjOq43LeAriRBkOWRQqp05 HToQ== X-Gm-Message-State: AOJu0YwQAzE4cQbs6SRiV9VIUqJf7GZ48W/0+OAMaYCc2wuoJZiOFJV2 STr9h41Y+Gt4+FMSQgMHIBOWoLU134fMGqUqEBVsTU6a5Q20uTtwRsifm291lAQGhgGf8T8oDTW HKt2YSeU3HXShsuT5FJMt3VacKFuAPcfhgi/tUw42OfH8YMbtfqe3nFMCRAE= 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:626:b0:67b:ba3d:56ba with SMTP id 006d021491bc7-67c18432529mr2283669eaf.29.1773910191306; Thu, 19 Mar 2026 01:49:51 -0700 (PDT) Date: Thu, 19 Mar 2026 01:49:51 -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: <69bbb8af.050a0220.1b2d94.000a.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