lkml.org 
[lkml]   [2018]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] hfsplus: fix potential refcnt problem of nls module
On Tue, 17 Apr 2018 15:05:33 +0800 Chengguang Xu <cgxu519@gmx.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]

\
 
 \ /
  Last update: 2018-04-18 21:43    [W:0.064 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site