public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Jan Kara <jack@suse.com>
Cc: linux-fsdevel@vger.kernel.org, Eric Sandeen <sandeen@redhat.com>
Subject: [PATCH] udf: fix nls leak on udf_fill_super() failure
Date: Wed, 11 Feb 2026 20:18:45 +0000	[thread overview]
Message-ID: <20260211201845.GN3183987@ZenIV> (raw)

[in viro/vfs.git #fixes at the moment; if you want to put it through your
tree, just say so]

On all failure exits that go to error_out there we have already moved the
nls reference from uopt->nls_map to sbi->s_nls_map, leaving NULL behind.
    
Fixes: c4e89cc674ac ("udf: convert to new mount API")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/fs/udf/super.c b/fs/udf/super.c
index b2f168b0a0d1..97a51c64ad48 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -2320,7 +2320,7 @@ static int udf_fill_super(struct super_block *sb, struct fs_context *fc)
 
 error_out:
 	iput(sbi->s_vat_inode);
-	unload_nls(uopt->nls_map);
+	unload_nls(sbi->s_nls_map);
 	if (lvid_open)
 		udf_close_lvid(sb);
 	brelse(sbi->s_lvid_bh);

             reply	other threads:[~2026-02-11 20:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 20:18 Al Viro [this message]
2026-02-12  9:59 ` [PATCH] udf: fix nls leak on udf_fill_super() failure 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=20260211201845.GN3183987@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=jack@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sandeen@redhat.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