Re: cleanup of hiddev
From: Jiri Kosina <hidden>
Date: 2008-11-11 23:53:12
On Wed, 5 Nov 2008, Oliver Neukum wrote:
this, I think, fixes everything.
Thanks a lot for working on this, Oliver. Could you please add a proper changelog, describing all the changes that had been done and why they were needed, so that this can be queued for 2.6.29?
schedule(); + if (mutex_lock_interruptible(&list->thread_lock)) + return -ERESTARTSYS;
Is ERESTARTSYS really appropriate here? Tail could have already moved from within other thread, right?
case HIDIOCGSTRING: - return hiddev_ioctl_string(hiddev, cmd, user_arg); + lock_kernel(); + if (!hiddev->exist) + r = hiddev_ioctl_string(hiddev, cmd, user_arg); + else + r = -ENODEV; + unlock_kernel(); + return r;
Hmm, I know that this is a legacy interface, but I am really hesitant to add a new synchronization using lock_kernel(), instead of removing it gradually altogether. Thanks, -- Jiri Kosina SUSE Labs