mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tristan Madani <tristmd@gmail.com>
To: jack@suse.com
Cc: linux-kernel@vger.kernel.org,
	syzbot+969e250fc7983fc7417c@syzkaller.appspotmail.com
Subject: [PATCH] udf: propagate error from udf_fiiter_add_entry
Date: Sat, 18 Apr 2026 13:10:35 +0000	[thread overview]
Message-ID: <20260418131035.1048143-1-tristmd@gmail.com> (raw)

From: Tristan Madani <tristan@talencesecurity.com>

udf_fiiter_add_entry() triggers a WARN when it encounters an error
condition but does not propagate the error to callers. This can be
triggered by a corrupted filesystem image.

Replace the WARN with proper error propagation to allow callers to
handle the failure gracefully.

Reported-by: syzbot+969e250fc7983fc7417c@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
 fs/udf/namei.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index 9a3b7cef36064..2249b79c0e0b2 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -207,14 +207,9 @@ static int udf_expand_dir_adinicb(struct inode *inode, udf_pblk_t *block)
 		udf_fiiter_write_fi(&iter, impuse);
 	}
 	brelse(dbh);
-	/*
-	 * We don't expect the iteration to fail as the directory has been
-	 * already verified to be correct
-	 */
-	WARN_ON_ONCE(ret);
 	udf_fiiter_release(&iter);
 
-	return 0;
+	return ret;
 }
 
 static int udf_fiiter_add_entry(struct inode *dir, struct dentry *dentry,
-- 
2.47.3


             reply	other threads:[~2026-04-18 13:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-18 13:10 Tristan Madani [this message]
2026-04-20  7:38 ` Jan Kara
2026-04-21 10:43 Tristan Madani
2026-04-21 12:36 ` Jan Kara
     [not found]   ` <CAA1XrhOd=xYChM-u0NHWXGtR7m_tY9JtYP4pRYHPo5oDCg49sg@mail.gmail.com>
2026-04-22  9:15     ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260418131035.1048143-1-tristmd@gmail.com \
    --to=tristmd@gmail.com \
    --cc=jack@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+969e250fc7983fc7417c@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®