lkml.org 
[lkml]   [2020]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 02/10] fs/ntfs3: Add initialization of super block
Date
From: Pali Rohár <pali@kernel.org>
Sent: Sunday, August 23, 2020 12:55 PM
>
> On Friday 21 August 2020 16:25:03 Konstantin Komarov wrote:
> > + case Opt_nls:
> > + match_strlcpy(nls_name, &args[0], sizeof(nls_name));
> > + break;
> > +
> > + /* unknown option */
> > + default:
> > + if (!silent)
> > + ntfs_error(
> > + sb,
> > + "Unrecognized mount option \"%s\" or missing value",
> > + p);
> > + //return -EINVAL;
> > + }
> > + }
> > +
> > +out:
> > + if (nls_name[0]) {
> > + sbi->nls = load_nls(nls_name);
> > + if (!sbi->nls) {
> > + /* critical ?*/
> > + ntfs_error(sb, "failed to load \"%s\"\n", nls_name);
> > + //return -EINVAL;
>
> Well, I think it is a fatal error if user supplied NLS encoding cannot
> be loaded. If user via mount parameter specify that wants encoding XYZ
> and kernel loads different (e.g. default one) then userspace would be
> confused as it would expect encoding XYZ.
>

Agreed. Will be fixed in V3.

> > + }
> > + }
> > +
> > + if (!sbi->nls) {
> > + sbi->nls = load_nls_default();
> > + if (!sbi->nls) {
> > + /* critical */
> > + ntfs_error(sb, "failed to load default nls");
> > + return -EINVAL;
> > + }
> > + }
> > +
> > + return 0;
> > +}

\
 
 \ /
  Last update: 2020-08-27 18:21    [W:0.073 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site