From: Christoph Hellwig <hch@lst.de>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: Christoph Hellwig <hch@lst.de>,
Shreeya Patel <shreeya.patel@collabora.com>,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 10/11] unicode: Add utf8-data module
Date: Tue, 12 Oct 2021 14:49:04 +0200 [thread overview]
Message-ID: <20211012124904.GB9518@lst.de> (raw)
In-Reply-To: <87wnmipjrw.fsf@collabora.com>
[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);
next prev parent reply other threads:[~2021-10-12 12:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 6:59 unicode cleanups, and split the data table into a separate module v2 Christoph Hellwig
2021-09-15 6:59 ` [PATCH 01/11] ext4: simplify ext4_sb_read_encoding Christoph Hellwig
2021-09-15 6:59 ` [PATCH 02/11] f2fs: simplify f2fs_sb_read_encoding Christoph Hellwig
2021-09-15 6:59 ` [PATCH 03/11] unicode: remove the charset field from struct unicode_map Christoph Hellwig
2021-09-15 6:59 ` [PATCH 04/11] unicode: mark the version field in struct unicode_map unsigned Christoph Hellwig
2021-09-15 7:00 ` [PATCH 05/11] unicode: pass a UNICODE_AGE() tripple to utf8_load Christoph Hellwig
2021-09-15 7:00 ` [PATCH 06/11] unicode: remove the unused utf8{,n}age{min,max} functions Christoph Hellwig
2021-09-15 7:00 ` [PATCH 07/11] unicode: simplify utf8len Christoph Hellwig
2021-09-15 7:00 ` [PATCH 08/11] unicode: move utf8cursor to utf8-selftest.c Christoph Hellwig
2021-09-15 7:00 ` [PATCH 09/11] unicode: cache the normalization tables in struct unicode_map Christoph Hellwig
2021-09-15 7:00 ` [PATCH 10/11] unicode: Add utf8-data module Christoph Hellwig
2021-10-12 11:25 ` Gabriel Krisman Bertazi
2021-10-12 12:49 ` Christoph Hellwig [this message]
2021-10-12 14:40 ` Gabriel Krisman Bertazi
2021-10-26 7:45 ` Christoph Hellwig
2021-10-26 13:56 ` Gabriel Krisman Bertazi
2021-10-26 22:02 ` Stephen Rothwell
2021-10-28 2:00 ` Track unicode tree in linux-next (was Re: [PATCH 10/11] unicode: Add utf8-data module) Gabriel Krisman Bertazi
2021-10-28 9:47 ` Stephen Rothwell
2021-09-15 7:00 ` [PATCH 11/11] unicode: only export internal symbols for the selftests Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2021-08-18 14:06 unicode cleanups, and split the data table into a separate module Christoph Hellwig
2021-08-18 14:06 ` [PATCH 10/11] unicode: Add utf8-data module Christoph Hellwig
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=20211012124904.GB9518@lst.de \
--to=hch@lst.de \
--cc=krisman@collabora.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=shreeya.patel@collabora.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;
as well as URLs for NNTP newsgroup(s).