From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933123AbcATLoh (ORCPT ); Wed, 20 Jan 2016 06:44:37 -0500 Received: from casper.infradead.org ([85.118.1.10]:55089 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932871AbcATLof (ORCPT ); Wed, 20 Jan 2016 06:44:35 -0500 Date: Wed, 20 Jan 2016 12:44:30 +0100 From: Peter Zijlstra To: Dmitry Vyukov Cc: One Thousand Gnomes , Ingo Molnar , Greg Kroah-Hartman , Jiri Slaby , LKML , J Freyensee , syzkaller , Kostya Serebryany , Alexander Potapenko , Sasha Levin , Eric Dumazet Subject: Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc Message-ID: <20160120114430.GA25010@twins.programming.kicks-ass.net> References: <20160115163300.063c224d@lxorguk.ukuu.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2016 at 10:36:01AM +0100, Dmitry Vyukov wrote: > +Peter, Ingo, can you please suggest a way to annotate this locking > pattern to avoid lockdep false positive? No, because I haven't a clue what the actual problem is. The report is fairly clear on how: routelock &port->buf.lock/1 &o_tty->termios_rwsem/1 &buf->lock gets established, and shows where we try: &buf->lock routelock Which gives a circle, ergo deadlock. Show which link is wrong and why, and I can suggest ways of annotating that.