From: Jiri Slaby <jslaby@suse.cz>
To: Havard Skinnemoen <hskinnemoen@google.com>
Cc: Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
Jiri Slaby <jirislaby@gmail.com>, Alan Cox <alan@linux.intel.com>
Subject: Re: tty related lockdep trace during bootup on 3.2-rc2
Date: Wed, 23 Nov 2011 11:12:03 +0100 [thread overview]
Message-ID: <4ECCC6F3.8000403@suse.cz> (raw)
In-Reply-To: <CAFQmdRYTgQOb53kQOvk1jubZbvaOrfjVCq4aG1H0ceshw2vVPA@mail.gmail.com>
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
next prev parent reply other threads:[~2011-11-23 10:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-23 3:38 tty related lockdep trace during bootup on 3.2-rc2 Dave Jones
2011-11-23 7:28 ` Havard Skinnemoen
2011-11-23 7:39 ` Cong Wang
2011-11-23 10:12 ` Jiri Slaby [this message]
2011-11-23 10:14 ` Jiri Slaby
2011-11-23 17:58 ` Havard Skinnemoen
2011-11-23 18:53 ` [RFC] cdc-acm: Fix potential deadlock (lockdep warning) Havard Skinnemoen
2011-11-23 19:22 ` Alan Cox
2011-11-23 19:22 ` Havard Skinnemoen
2011-11-23 19:44 ` Alan Cox
2011-11-23 21:03 ` Havard Skinnemoen
2011-11-23 21:59 ` Alan Cox
2011-11-23 19:34 ` Oliver Neukum
2011-11-23 22:00 ` Alan Cox
2011-11-23 19:55 ` Jiri Slaby
2011-11-23 21:08 ` Havard Skinnemoen
2011-11-23 21:11 ` Jiri Slaby
2011-11-23 21:19 ` Jiri Slaby
2011-11-27 21:37 ` [RFC v2] " Havard Skinnemoen
2011-11-28 18:15 ` Havard Skinnemoen
2011-11-23 7:29 ` tty related lockdep trace during bootup on 3.2-rc2 Cong Wang
2011-11-23 17:29 ` Havard Skinnemoen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECCC6F3.8000403@suse.cz \
--to=jslaby@suse.cz \
--cc=alan@linux.intel.com \
--cc=davej@redhat.com \
--cc=gregkh@suse.de \
--cc=hskinnemoen@google.com \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox