lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpVONaS8hA7Be-FkqdDJCbt2sx_p1sX64nMbMpY5RyCdiA@mail.gmail.com>
Date:	Wed, 23 Nov 2011 15:39:57 +0800
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Havard Skinnemoen <hskinnemoen@...gle.com>
Cc:	Dave Jones <davej@...hat.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: tty related lockdep trace during bootup on 3.2-rc2

On Wed, Nov 23, 2011 at 3:28 PM, Havard Skinnemoen
<hskinnemoen@...gle.com> wrote:
> On Tue, Nov 22, 2011 at 7:38 PM, Dave Jones <davej@...hat.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?

Yes, exactly.

>
> 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.

But...

static void acm_tty_hangup(struct tty_struct *tty)
{
        struct acm *acm = tty->driver_data;
        tty_port_hangup(&acm->port); //<---------------- No open_mutex
protected neither...
        mutex_lock(&open_mutex);
        acm_port_down(acm);
        mutex_unlock(&open_mutex);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ