From: "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
To: Kusanagi Kouichi <slash@ac.auone-net.jp>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-9p: Check the return value of llistxattr.
Date: Sat, 30 Oct 2010 14:29:44 -0700 [thread overview]
Message-ID: <4CCC8E48.40707@linux.vnet.ibm.com> (raw)
In-Reply-To: <20101030025240.0676A6FC03B@msa105.auone-net.jp>
On 10/29/2010 7:52 PM, Kusanagi Kouichi wrote:
> If llistxattr returned 0, qemu aborts.
>
> Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Acked-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
> ---
> hw/virtio-9p-xattr.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/hw/virtio-9p-xattr.c b/hw/virtio-9p-xattr.c
> index 175f372..1aab081 100644
> --- a/hw/virtio-9p-xattr.c
> +++ b/hw/virtio-9p-xattr.c
> @@ -73,6 +73,9 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
>
> /* Get the actual len */
> xattr_len = llistxattr(rpath(ctx, path), value, 0);
> + if (xattr_len <= 0) {
> + return xattr_len;
> + }
>
> /* Now fetch the xattr and find the actual size */
> orig_value = qemu_malloc(xattr_len);
prev parent reply other threads:[~2010-10-30 21:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-30 2:52 [Qemu-devel] [PATCH] virtio-9p: Check the return value of llistxattr Kusanagi Kouichi
2010-10-30 21:29 ` Venkateswararao Jujjuri (JV) [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=4CCC8E48.40707@linux.vnet.ibm.com \
--to=jvrao@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=slash@ac.auone-net.jp \
/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).