[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120525144713.6946df1e@bob.linux.org.uk>
Date: Fri, 25 May 2012 14:47:13 +0100
From: Alan Cox <alan@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ming Lei <ming.lei@...onical.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] tty: tty_mutex: fix lockdep warning in
tty_lock_pair(v1)
> Having looked at the source I still don't see how it could possibly
> work,.. So the problem with tty_release() -> tty_ldisc_release() is
> that tty_ldisc_release() does an unlock/lock of tty.
Yes it should do the pair, see the patch I posted restructing it, and
the second one restructing it right.
> However your tty_lock_pair() can still result in tty being subclass 1,
> see your else branch, nested case.
>
> That said, how is this not a real deadlock? If you rely on tty pointer
> ordering to avoid deadlocks, you always need to lock them in the same
> order. The unlock+lock in ldisc_release violates that.
Which was a bug.
Alan
--
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