[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 CC: Arnd Bergmann --- drivers/char/virtio_console

[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 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 b

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 [11:52:01], Amit Shah wrote: > 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~ > > > >