From: Rusty Russell <rusty@rustcorp.com.au>
To: Amit Shah <amit.shah@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Virtualization List <virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH 1/2] virtio: console: Fix poll blocking even though there is data to read
Date: Mon, 20 Sep 2010 12:19:33 +0930 [thread overview]
Message-ID: <201009201219.34378.rusty@rustcorp.com.au> (raw)
In-Reply-To: <6c7c2590a114d65ec52689be7cda7ada5ee876d5.1284628364.git.amit.shah@redhat.com>
On Thu, 16 Sep 2010 06:43:08 pm Amit Shah wrote:
> From: Hans de Goede <hdegoede@redhat.com>
>
> I found this while working on a Linux agent for spice, the symptom I was
> seeing was select blocking on the spice vdagent virtio serial port even
> though there were messages queued up there.
>
> virtio_console's port_fops_poll checks port->inbuf != NULL to determine
> if read won't block. However if an application reads enough bytes from
> inbuf through port_fops_read, to empty the current port->inbuf,
> port->inbuf will be NULL even though there may be buffers left in the
> virtqueue.
>
> This causes poll() to block even though there is data to be read,
> this patch fixes this by using will_read_block(port) instead of the
> port->inbuf != NULL check.
>
> Signed-off-By: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>
Thanks. I assume this one should go into stable too?
Cheers,
Rusty.
next prev parent reply other threads:[~2010-09-20 2:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 9:13 [PATCH 1/2] virtio: console: Fix poll blocking even though there is data to read Amit Shah
2010-09-16 9:13 ` [PATCH 2/2] virtio: console: Disable lseek(2) for port file operations Amit Shah
2010-09-20 2:49 ` Rusty Russell [this message]
2010-09-20 5:08 ` [PATCH 1/2] virtio: console: Fix poll blocking even though there is data to read Amit Shah
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=201009201219.34378.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=amit.shah@redhat.com \
--cc=hdegoede@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.