From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: "viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: RE: [PATCH v2 02/10] fs/ntfs3: Add initialization of super block
Date: Thu, 27 Aug 2020 16:20:14 +0000 [thread overview]
Message-ID: <208746d50bbf4ffc8de599a4e10befd8@paragon-software.com> (raw)
In-Reply-To: <20200823095500.ug5vibiv3hy3luqs@pali>
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;
> > +}
prev parent reply other threads:[~2020-08-27 16:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <caddbe41eaef4622aab8bac24934eed1@paragon-software.com>
2020-08-21 17:35 ` [PATCH v2 02/10] fs/ntfs3: Add initialization of super block Randy Dunlap
2020-08-27 16:04 ` Konstantin Komarov
2020-08-21 19:39 ` Joe Perches
2020-08-27 16:14 ` Konstantin Komarov
2020-08-23 9:55 ` Pali Rohár
2020-08-27 16:20 ` Konstantin Komarov [this message]
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=208746d50bbf4ffc8de599a4e10befd8@paragon-software.com \
--to=almaz.alexandrovich@paragon-software.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).