search for: fops_read

Displaying 3 results from an estimated 3 matches for "fops_read".

2013 Jul 19
2
[PATCH 04/10] virtio: console: return -ENODEV on all read operations after unplug
...gt; 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 6bf0df3..a39702a 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -749,6 +749,10 @@ static ssize_t port_fops_read(struct file *filp, char __user *ubuf, > > port = filp->private_data; > > + /* Port is hot-unplugged. */ > + if (!port->guest_connected) > + return -ENODEV; > + What if the port is hot-unplugged after this check? Should we serialize the hot plug with inbuf_lock her...
2013 Jul 19
2
[PATCH 04/10] virtio: console: return -ENODEV on all read operations after unplug
...gt; 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 6bf0df3..a39702a 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -749,6 +749,10 @@ static ssize_t port_fops_read(struct file *filp, char __user *ubuf, > > port = filp->private_data; > > + /* Port is hot-unplugged. */ > + if (!port->guest_connected) > + return -ENODEV; > + What if the port is hot-unplugged after this check? Should we serialize the hot plug with inbuf_lock her...
2013 Jul 19
0
[PATCH 04/10] virtio: console: return -ENODEV on all read operations after unplug
...ons(+), 1 deletion(-) > > > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > > index 6bf0df3..a39702a 100644 > > --- a/drivers/char/virtio_console.c > > +++ b/drivers/char/virtio_console.c > > @@ -749,6 +749,10 @@ static ssize_t port_fops_read(struct file *filp, char __user *ubuf, > > > > port = filp->private_data; > > > > + /* Port is hot-unplugged. */ > > + if (!port->guest_connected) > > + return -ENODEV; > > + > > What if the port is hot-unplugged after this check? Should...