search for: port_fops_pol

Displaying 20 results from an estimated 43 matches for "port_fops_pol".

Did you mean: port_fops_poll
2013 Jul 19
2
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...le.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 7728af9..1d4b748 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) > unsigned int ret; > > port = filp->private_data; > + if (!port->guest_connected) { > + /* Port was unplugged before we could proceed */ > + return POLLHUP; > + } > poll_wait(filp, &port->waitqueue, wait); >...
2013 Jul 19
2
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...le.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 7728af9..1d4b748 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) > unsigned int ret; > > port = filp->private_data; > + if (!port->guest_connected) { > + /* Port was unplugged before we could proceed */ > + return POLLHUP; > + } > poll_wait(filp, &port->waitqueue, wait); >...
2013 Jul 19
2
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...(+) >>> >>> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c >>> index 7728af9..1d4b748 100644 >>> --- a/drivers/char/virtio_console.c >>> +++ b/drivers/char/virtio_console.c >>> @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) >>> unsigned int ret; >>> >>> port = filp->private_data; >>> + if (!port->guest_connected) { >>> + /* Port was unplugged before we could proceed */ >>> + return POLLHUP; >>> + } >&g...
2013 Jul 19
2
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...(+) >>> >>> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c >>> index 7728af9..1d4b748 100644 >>> --- a/drivers/char/virtio_console.c >>> +++ b/drivers/char/virtio_console.c >>> @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) >>> unsigned int ret; >>> >>> port = filp->private_data; >>> + if (!port->guest_connected) { >>> + /* Port was unplugged before we could proceed */ >>> + return POLLHUP; >>> + } >&g...
2013 Jul 18
0
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...gt; --- drivers/char/virtio_console.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 7728af9..1d4b748 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) unsigned int ret; port = filp->private_data; + if (!port->guest_connected) { + /* Port was unplugged before we could proceed */ + return POLLHUP; + } poll_wait(filp, &port->waitqueue, wait); if (!port->guest_connected) { -- 1.8.1....
2013 Jul 19
0
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...nged, 4 insertions(+) > > > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > > index 7728af9..1d4b748 100644 > > --- a/drivers/char/virtio_console.c > > +++ b/drivers/char/virtio_console.c > > @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) > > unsigned int ret; > > > > port = filp->private_data; > > + if (!port->guest_connected) { > > + /* Port was unplugged before we could proceed */ > > + return POLLHUP; > > + } > > poll_wait(filp,...
2013 Jul 19
0
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...;>> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > >>> index 7728af9..1d4b748 100644 > >>> --- a/drivers/char/virtio_console.c > >>> +++ b/drivers/char/virtio_console.c > >>> @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) > >>> unsigned int ret; > >>> > >>> port = filp->private_data; > >>> + if (!port->guest_connected) { > >>> + /* Port was unplugged before we could proceed */ > >>> + return PO...
2013 Jul 23
0
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...rs/char/virtio_console.c b/drivers/char/virtio_console.c >>>>>> index 7728af9..1d4b748 100644 >>>>>> --- a/drivers/char/virtio_console.c >>>>>> +++ b/drivers/char/virtio_console.c >>>>>> @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) >>>>>> unsigned int ret; >>>>>> >>>>>> port = filp->private_data; >>>>>> + if (!port->guest_connected) { >>>>>> + /* Port was unplugged before we could procee...
2013 Jul 22
3
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...-git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c >> >>> index 7728af9..1d4b748 100644 >> >>> --- a/drivers/char/virtio_console.c >> >>> +++ b/drivers/char/virtio_console.c >> >>> @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) >> >>> unsigned int ret; >> >>> >> >>> port = filp->private_data; >> >>> + if (!port->guest_connected) { >> >>> + /* Port was unplugged before we could proceed */ >> &...
2013 Jul 22
3
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...-git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c >> >>> index 7728af9..1d4b748 100644 >> >>> --- a/drivers/char/virtio_console.c >> >>> +++ b/drivers/char/virtio_console.c >> >>> @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) >> >>> unsigned int ret; >> >>> >> >>> port = filp->private_data; >> >>> + if (!port->guest_connected) { >> >>> + /* Port was unplugged before we could proceed */ >> &...
2013 Jul 23
1
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...onsole.c b/drivers/char/virtio_console.c >>>>>>> index 7728af9..1d4b748 100644 >>>>>>> --- a/drivers/char/virtio_console.c >>>>>>> +++ b/drivers/char/virtio_console.c >>>>>>> @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) >>>>>>> unsigned int ret; >>>>>>> >>>>>>> port = filp->private_data; >>>>>>> + if (!port->guest_connected) { >>>>>>> + /* Port was unplugged be...
2013 Jul 23
1
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...onsole.c b/drivers/char/virtio_console.c >>>>>>> index 7728af9..1d4b748 100644 >>>>>>> --- a/drivers/char/virtio_console.c >>>>>>> +++ b/drivers/char/virtio_console.c >>>>>>> @@ -967,6 +967,10 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) >>>>>>> unsigned int ret; >>>>>>> >>>>>>> port = filp->private_data; >>>>>>> + if (!port->guest_connected) { >>>>>>> + /* Port was unplugged be...
2010 Sep 16
2
[PATCH 1/2] virtio: console: Fix poll blocking even though there is data to read
From: Hans de Goede <hdegoede at 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...
2010 Sep 16
2
[PATCH 1/2] virtio: console: Fix poll blocking even though there is data to read
From: Hans de Goede <hdegoede at 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...
2010 Sep 15
1
PATCH: virtio_console: Fix poll blocking even though there is data to read
...n the spice vdagent virtio serial port even though there were messages queued up there. 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...
2010 Sep 15
1
PATCH: virtio_console: Fix poll blocking even though there is data to read
...n the spice vdagent virtio serial port even though there were messages queued up there. 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...
2010 Sep 15
1
PATCH: virtio_console: Fix poll blocking even though there is data to read (version 2)
...n the spice vdagent virtio serial port even though there were messages queued up there. 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...
2010 Sep 15
1
PATCH: virtio_console: Fix poll blocking even though there is data to read (version 2)
...n the spice vdagent virtio serial port even though there were messages queued up there. 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...
2014 Nov 13
1
[PATCH 52/56] drivers/char/virtio: support compiling out splice
...ct scatterlist *sg; }; +#ifdef CONFIG_SYSCALL_SPLICE static int pipe_to_sg(struct pipe_inode_info *pipe, struct pipe_buffer *buf, struct splice_desc *sd) { @@ -976,6 +977,7 @@ error_out: pipe_unlock(pipe); return ret; } +#endif /* #ifdef CONFIG_SYSCALL_SPLICE */ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) { @@ -1109,7 +1111,7 @@ static const struct file_operations port_fops = { .open = port_fops_open, .read = port_fops_read, .write = port_fops_write, - .splice_write = port_fops_splice_write, + SPLICE_WRITE_INIT(port_fops_splice_write) .poll = port_fo...
2014 Nov 13
1
[PATCH 52/56] drivers/char/virtio: support compiling out splice
...ct scatterlist *sg; }; +#ifdef CONFIG_SYSCALL_SPLICE static int pipe_to_sg(struct pipe_inode_info *pipe, struct pipe_buffer *buf, struct splice_desc *sd) { @@ -976,6 +977,7 @@ error_out: pipe_unlock(pipe); return ret; } +#endif /* #ifdef CONFIG_SYSCALL_SPLICE */ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) { @@ -1109,7 +1111,7 @@ static const struct file_operations port_fops = { .open = port_fops_open, .read = port_fops_read, .write = port_fops_write, - .splice_write = port_fops_splice_write, + SPLICE_WRITE_INIT(port_fops_splice_write) .poll = port_fo...