All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Markus Pargmann <mpa@pengutronix.de>
Cc: nbd-general@lists.sourceforge.net,
	Oleg Nesterov <oleg@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] nbd: Remove signal usage
Date: Tue, 10 Nov 2015 04:46:18 +0000	[thread overview]
Message-ID: <20151110044617.GC22011@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1446133360-30652-2-git-send-email-mpa@pengutronix.de>

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

  reply	other threads:[~2015-11-10  4:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 15:42 [PATCH 0/4] nbd: Remove signal usage Markus Pargmann
2015-10-29 15:42 ` [PATCH 1/4] " Markus Pargmann
2015-11-10  4:46   ` Al Viro [this message]
2015-11-10 10:22     ` Markus Pargmann
2015-10-29 15:42 ` [PATCH 2/4] nbd: Timeouts are not user requested disconnects Markus Pargmann
2015-10-29 15:42 ` [PATCH 3/4] nbd: Cleanup reset of nbd and bdev after a disconnect Markus Pargmann
2015-10-29 15:42 ` [PATCH 4/4] nbd: Move flag parsing to a function Markus Pargmann
2015-11-01 19:05 ` [PATCH 0/4] nbd: Remove signal usage Oleg Nesterov
2015-11-09 11:09   ` Markus Pargmann

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=20151110044617.GC22011@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpa@pengutronix.de \
    --cc=nbd-general@lists.sourceforge.net \
    --cc=oleg@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.