On Tue, Mar 03, 2015 at 10:47:14AM -0500, Alan Stern wrote:
> @@ -1279,6 +1284,9 @@ ep0_poll (struct file *fd, poll_table *w
>         struct dev_data         *dev = fd->private_data;
>         int                     mask = 0;
>  
> +     if (dev->state <= STATE_DEV_OPENED)
> +             return -ENODEV;
> +
>         poll_wait(fd, &dev->wait, wait);
>  
>         spin_lock_irq (&dev->lock);

That, BTW, is wrong.  ->poll() does *not* return negatives - to imitate
"we don't have ->poll()" we need it to return DEFAULT_POLLMASK.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to