Google
  Web www.spinics.net

Re: [patch]locking in idmouse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Tue, 23 Oct 2007 14:23:13 +0200, Oliver Neukum <oliver@xxxxxxxxxx> 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/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux