* [PATCH] udf: fix nls leak on udf_fill_super() failure
@ 2026-02-11 20:18 Al Viro
2026-02-12 9:59 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2026-02-11 20:18 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, Eric Sandeen
[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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] udf: fix nls leak on udf_fill_super() failure
2026-02-11 20:18 [PATCH] udf: fix nls leak on udf_fill_super() failure Al Viro
@ 2026-02-12 9:59 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2026-02-12 9:59 UTC (permalink / raw)
To: Al Viro; +Cc: Jan Kara, linux-fsdevel, Eric Sandeen
On Wed 11-02-26 20:18:45, Al Viro wrote:
> [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>
Thanks for catching this! It's fine if you merge it so feel free to add:
Acked-by: Jan Kara <jack@suse.cz>
Honza
> ---
> 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);
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-12 9:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 20:18 [PATCH] udf: fix nls leak on udf_fill_super() failure Al Viro
2026-02-12 9:59 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox