lkml.org 
[lkml]   [2009]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [GIT] HID updates for 2.6.29
Date
Am Wednesday 07 January 2009 11:22:27 schrieb Jiri Kosina:
> On Wed, 7 Jan 2009, Gabriel C wrote:

> I believe this is caused by forgotten assignment in usb_register_dev()
> error handling introduced in 079034073fa (added Oliver to CC).

Yes, it seem I caused this. Sorry.

> Commit 079034073fa ("HID: hiddev cleanup -- handle all error conditions
> properly") by mistake removed proper initialization of hid->hiddev pointer
> in hiddev_connect() in case usb_register_dev() succeeds for the hiddev node.
> Put it properly back in place.
>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
> ---
> drivers/hid/usbhid/hiddev.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
> index 6a98f9f..1928e8a 100644
> --- a/drivers/hid/usbhid/hiddev.c
> +++ b/drivers/hid/usbhid/hiddev.c
> @@ -885,6 +885,7 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
> } else {
> hid->minor = usbhid->intf->minor;
> hiddev_table[usbhid->intf->minor - HIDDEV_MINOR_BASE] = hiddev;
> + hid->hiddev = hiddev;

It seems to me that this is still a race condition. What prevents open()
from being called before this is set?

Regards
Oliver


\
 
 \ /
  Last update: 2009-01-07 12:33    [from the cache]
©2003-2011 Jasper Spaans