Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752297AbbKJEq3 (ORCPT ); Mon, 9 Nov 2015 23:46:29 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:36362 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751476AbbKJEq0 (ORCPT ); Mon, 9 Nov 2015 23:46:26 -0500 Date: Tue, 10 Nov 2015 04:46:18 +0000 From: Al Viro To: Markus Pargmann Cc: nbd-general@lists.sourceforge.net, Oleg Nesterov , Christoph Hellwig , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] nbd: Remove signal usage Message-ID: <20151110044617.GC22011@ZenIV.linux.org.uk> References: <1446133360-30652-1-git-send-email-mpa@pengutronix.de> <1446133360-30652-2-git-send-email-mpa@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446133360-30652-2-git-send-email-mpa@pengutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 844 Lines: 26 On Thu, Oct 29, 2015 at 04:42:37PM +0100, Markus Pargmann wrote: > del_timer_sync(&nbd->timeout_timer); > + > +out: > + spin_unlock_irq(&nbd->sock_lock); ... and in its callback we have this: > @@ -148,17 +155,15 @@ static void nbd_xmit_timeout(unsigned long arg) > > nbd->disconnect = true; > > - spin_lock_irqsave(&nbd->tasks_lock, flags); > + spin_lock_irqsave(&nbd->sock_lock, flags); * CPU 1 enters sock_shutdown() and grabs ->sock_lock. * on CPU2 the timer hits and we enter the callback, where we spin on that spinlock. * in the meanwhile, CPU1 calls del_timer_sync() Deadlock... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/