From: Kevin Wolf <kwolf@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block/vvfat: Fix crash when reporting error about too many files in directory
Date: Mon, 23 Jul 2018 16:33:40 +0200 [thread overview]
Message-ID: <20180723143340.GJ8817@localhost.localdomain> (raw)
In-Reply-To: <1531927703-9799-1-git-send-email-thuth@redhat.com>
Am 18.07.2018 um 17:28 hat Thomas Huth geschrieben:
> When using the vvfat driver with a directory that contains too many files,
> QEMU currently crashes. We are trying to print the wrong path variable here.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> block/vvfat.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/block/vvfat.c b/block/vvfat.c
> index fc41841..6ae7458 100644
> --- a/block/vvfat.c
> +++ b/block/vvfat.c
> @@ -975,8 +975,7 @@ static int init_directories(BDRVVVFATState* s,
> if (mapping->mode & MODE_DIRECTORY) {
> mapping->begin = cluster;
> if(read_directory(s, i)) {
> - error_setg(errp, "Could not read directory %s",
> - mapping->path);
> + error_setg(errp, "Could not read directory \"%s\"", s->path);
Hm, I'm not sure if that's right. Before this patch we were printing
the name of the subdirectory that couldn't be loaded, now it's the
parent directory.
My test case where this difference is visible is a subdirectory with
chmod 000.
> return -1;
> }
> mapping = array_get(&(s->mapping), i);
Maybe the right solution would be moving the reloading of mapping to
between the read_directory() call and the error path?
Kevin
next prev parent reply other threads:[~2018-07-23 14:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 15:28 [Qemu-devel] [PATCH] block/vvfat: Fix crash when reporting error about too many files in directory Thomas Huth
2018-07-18 22:58 ` Philippe Mathieu-Daudé
2018-07-23 14:33 ` Kevin Wolf [this message]
2018-07-24 9:56 ` Thomas Huth
2018-07-24 10:49 ` Kevin Wolf
2018-07-24 11:38 ` Thomas Huth
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=20180723143340.GJ8817@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.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).