Messages in this thread | | | Date | Tue, 3 Mar 2015 22:20:08 +0000 | From | Al Viro <> | Subject | Re: gadgetfs broken since 7f7f25e8 |
| |
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.
| |