Re: PATCH: virtio_console: Fix poll blocking even though there is data to read

2010-09-16 Thread Rusty Russell
On Wed, 15 Sep 2010 11:16:24 pm Amit Shah wrote: On (Wed) Sep 15 2010 [15:37:21], Hans de Goede wrote: --- linux-2.6.35.x86_64/drivers/char/virtio_console.c~2010-08-02 00:11:14.0 +0200 +++ linux-2.6.35.x86_64/drivers/char/virtio_console.c 2010-09-15 13:39:29.043505000

Re: [PATCH] vhost-net: fix range checking in mrg bufs case

2010-09-16 Thread Jason Wang
Tested-by: Jason Wang jasow...@redhat.com - Michael S. Tsirkin m...@redhat.com wrote: In mergeable buffer case, we use headcount, log_num and seg as indexes in same-size arrays, and we know that headcount = seg and log_num equals either 0 or seg. Therefore, the right thing to do is

Re: PATCH: virtio_console: Fix poll blocking even though there is data to read

2010-09-16 Thread Amit Shah
On (Thu) Sep 16 2010 [15:32:54], Rusty Russell wrote: On Wed, 15 Sep 2010 11:16:24 pm Amit Shah wrote: On (Wed) Sep 15 2010 [15:37:21], Hans de Goede wrote: --- linux-2.6.35.x86_64/drivers/char/virtio_console.c~ 2010-08-02 00:11:14.0 +0200 +++

[PATCH 1/2] virtio: console: Fix poll blocking even though there is data to read

2010-09-16 Thread Amit Shah
From: Hans de Goede hdego...@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

[PATCH 2/2] virtio: console: Disable lseek(2) for port file operations

2010-09-16 Thread Amit Shah
The ports are char devices; do not have seeking capabilities. Calling nonseekable_open() from the fops_open() call and setting the llseek fops pointer to no_llseek ensures an lseek() call from userspace returns -ESPIPE. Signed-off-by: Amit Shah amit.s...@redhat.com CC: Arnd Bergmann