# Re: cleanup of hiddev

- From: Jiri Slaby \<hidden\>
- Date: 2008-11-05 12:03:47 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2008/11/8910384
- Thread: https://ratatoskr.run/linux-input/2008/11/8910384/t.md

```text
On 11/05/2008 12:52 PM, Oliver Neukum wrote:
> @@ -334,35 +354,45 @@ static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t coun
>  					break;
>  				}
>  
> +				/* let O_NONBLOCK tasks run */
> +				mutex_unlock(&list->thread_lock);
>  				schedule();
> +				if (mutex_lock_interruptible(&list->thread_lock))
> +					return -ERESTARTSYS;

This should be EINTR, since the code potentially moved with tail and no rollback
is performed.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```
