From: Jan Kara <jack@suse.cz>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Jan Kara <jack@suse.cz>, Jan Kara <jack@suse.com>,
linux-kernel@vger.kernel.org,
Andrew Gabbasov <andrew_gabbasov@mentor.com>
Subject: Re: [PATCH] udf: fix dvd mounting error
Date: Mon, 19 Nov 2018 10:25:15 +0100 [thread overview]
Message-ID: <20181119092515.GA16427@quack2.suse.cz> (raw)
In-Reply-To: <20181116143314.qn7jmtyz4ad4bax6@debian>
On Fri 16-11-18 14:33:14, Sudip Mukherjee wrote:
> > From e1a7680b960fe25821f2419b4c0b1215f8ab2f9b Mon Sep 17 00:00:00 2001
> > From: Jan Kara <jack@suse.cz>
> > Date: Fri, 16 Nov 2018 13:43:17 +0100
> > Subject: [PATCH] udf: Allow mounting volumes with incorrect identification
> > strings
> >
> > Commit c26f6c615788 ("udf: Fix conversion of 'dstring' fields to UTF8")
> > started to be more strict when checking whether converted strings are
> > properly formatted. Sudip reports that there are DVDs where the volume
> > identification string is actually too long - UDF reports:
> >
> > [ 632.309320] UDF-fs: incorrect dstring lengths (32/32)
> >
> > during mount and fails the mount. This is mostly harmless failure as we
> > don't need volume identification (and even less volume set
> > identification) for anything. So just truncate the volume identification
> > string if it is too long and replace it with 'Invalid' if we just cannot
> > convert it for other reasons. This keeps slightly incorrect media still
> > mountable.
> >
> > CC: stable@vger.kernel.org
> > Fixes: c26f6c615788 ("udf: Fix conversion of 'dstring' fields to UTF8")
> > Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> > Signed-off-by: Jan Kara <jack@suse.cz>
> > ---
>
> It works perfectly. Thanks.
>
> Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Thanks for testing!
> > - if (ret < 0)
> > - goto out_bh;
> > -
> > - strncpy(UDF_SB(sb)->s_volume_ident, outstr, ret);
> > + if (ret < 0) {
> > + strcpy(UDF_SB(sb)->s_volume_ident, "Invalid");
>
> Just a suggestion. Even on failed cases, having the volume identification
> as "Invalid" might confuse the users. Since you have a maximum limit as 31
> maybe something more meaningful like "No Name" ?
I agree something long might be better. I think 'InvalidName' might be
better than 'No Name'. Thanks for suggestion.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
prev parent reply other threads:[~2018-11-19 9:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 12:26 [PATCH] udf: fix dvd mounting error Sudip Mukherjee
2018-11-16 12:56 ` Jan Kara
2018-11-16 14:33 ` Sudip Mukherjee
2018-11-19 9:25 ` Jan Kara [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=20181119092515.GA16427@quack2.suse.cz \
--to=jack@suse.cz \
--cc=andrew_gabbasov@mentor.com \
--cc=jack@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.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).