lkml.org 
[lkml]   [2011]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] cdc-acm: Fix potential deadlock (lockdep warning)
On 11/23/2011 07:53 PM, Havard Skinnemoen wrote:
> --- a/drivers/usb/class/cdc-acm.c
> +++ b/drivers/usb/class/cdc-acm.c
...
> @@ -567,19 +574,10 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)
>
> /* Perform the closing process and see if we need to do the hardware
> shutdown */
> - if (!acm)
> - return;
> -
> - mutex_lock(&open_mutex);
> if (tty_port_close_start(&acm->port, tty, filp) == 0) {

Note that port->count is protected by port->lock usually. Till now it
used to be protected by open_mutex in your driver. As of now it is not
protected by anything. (Well, BTM is still there to save you, but...)

thanks,
--
js
suse labs


\
 
 \ /
  Last update: 2011-11-23 20:59    [W:0.156 / U:1.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site