Re: [patch]locking in idmouse
Pete Zaitcev <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
On Tue, 23 Oct 2007 14:23:13 +0200, Oliver Neukum <[email protected]> wrote: > +++ work/drivers/usb/misc/idmouse.c 2007-10-23 14:13:52.000000000 +0200 > @@ -258,12 +263,14 @@ static int idmouse_release(struct inode > if (dev == NULL) > return -ENODEV; > > + mutex_lock(&open_disc_mutex); > /* lock our device */ > - down(&dev->sem); > + mutex_lock(&dev->lock); ACK Unfortunately, it's a different paradigm from what I implemented in adutux. Here, disconnect only prevents new opens with a static lock and poisoning. Thereafter, it relies on releases not happening when dev->open is zero. Clever. -- Pete ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel