[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180418124332.aac5d1d8f331ce78732836d6@linux-foundation.org>
Date: Wed, 18 Apr 2018 12:43:32 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Chengguang Xu <cgxu519@....com>
Cc: linux-fsdevel@...r.kernel.org, dhowells@...hat.com,
kstewart@...uxfoundation.org, gregkh@...uxfoundation.org,
tglx@...utronix.de, pombredanne@...b.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] hfsplus: fix potential refcnt problem of nls module
On Tue, 17 Apr 2018 15:05:33 +0800 Chengguang Xu <cgxu519@....com> wrote:
> When specifying nls option multiple times in a mount,
> current option parsing will cause inaccurate refcount of nls
> module. Hence, call unload_nls for previous one in this case.
>
> --- a/fs/hfsplus/options.c
> +++ b/fs/hfsplus/options.c
> @@ -171,8 +171,10 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi)
> return 0;
> }
> p = match_strdup(&args[0]);
> - if (p)
> + if (p) {
> + unload_nls(sbi->nls);
> sbi->nls = load_nls(p);
> + }
> if (!sbi->nls) {
> pr_err("unable to load nls mapping \"%s\"\n",
> p);
Same problem as in [patch 1/2]
Powered by blists - more mailing lists