lkml.org 
[lkml]   [2011]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tty related lockdep trace during bootup on 3.2-rc2
On 11/23/2011 08:28 AM, Havard Skinnemoen wrote:
> On Tue, Nov 22, 2011 at 7:38 PM, Dave Jones <davej@redhat.com> wrote:
>> From Linus' current tree...
>>
>> related to 5dc2470c602da8851907ec18942cd876c3b4ecc1 maybe ?
>
> Yes, probably. I did have a bad feeling about the locking, but it
> seemed to behave well during testing. Wonder why I didn't see this.
>
> So what's happening is that tty_open() holds big_tty_mutex while
> calling acm_tty_open which takes open_lock, and acm_tty_close holds
> open_lock while calling tty_port_close_start which takes
> big_tty_mutex?
>
> Not sure how to solve this. Not taking the lock before calling
> tty_port_close_start means the tty_port may get freed before it
> returns.

Oh, how it can be? You should vhangup the device on disconnect. Then you
will be sure all close calls were performed before freeing the port.
Then you can free the port, right?

Like:
* forbid further opens
* tty_vhangup
* stop the device
* free the device state

Also it looks like you have a leak in disconnect when there are users
still. If I am looking correctly?

thanks,
--
js
suse labs


\
 
 \ /
  Last update: 2011-11-23 11:15    [from the cache]
©2003-2011 Jasper Spaans