lkml.org 
[lkml]   [2015]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] nbd: Remove signal usage
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...


\
 
 \ /
  Last update: 2015-11-10 06:01    [W:0.080 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site