[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211012124904.GB9518@lst.de>
Date: Tue, 12 Oct 2021 14:49:04 +0200
From: Christoph Hellwig <hch@....de>
To: Gabriel Krisman Bertazi <krisman@...labora.com>
Cc: Christoph Hellwig <hch@....de>,
Shreeya Patel <shreeya.patel@...labora.com>,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [PATCH 10/11] unicode: Add utf8-data module
[fullquote deleted]
On Tue, Oct 12, 2021 at 08:25:23AM -0300, Gabriel Krisman Bertazi wrote:
> > @@ -187,6 +207,7 @@ EXPORT_SYMBOL(utf8_load);
> >
> > void utf8_unload(struct unicode_map *um)
> > {
> > + symbol_put(utf8_data_table);
>
> This triggers a BUG_ON if the symbol isn't loaded/loadable,
> i.e. ext4_fill_super fails early. I'm not sure how to fix it, though.
Does this fix it?
diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c
index 38ca824f10158..67aaadc3ab072 100644
--- a/fs/unicode/utf8-core.c
+++ b/fs/unicode/utf8-core.c
@@ -207,8 +207,10 @@ EXPORT_SYMBOL(utf8_load);
void utf8_unload(struct unicode_map *um)
{
- symbol_put(utf8_data_table);
- kfree(um);
+ if (um) {
+ symbol_put(utf8_data_table);
+ kfree(um);
+ }
}
EXPORT_SYMBOL(utf8_unload);
Powered by blists - more mailing lists