public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Ben Hutchings <ben@decadent.org.uk>,
	Markus Pargmann <mpa@pengutronix.de>
Cc: nbd-general@lists.sourceforge.net,
	Michal Belczyk <belczyk@bsd.krakow.pl>,
	Hermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nbd: Add locking for tasks
Date: Thu, 8 Oct 2015 14:21:57 -0600	[thread overview]
Message-ID: <5616D065.6070708@kernel.dk> (raw)
In-Reply-To: <1444335269.2956.268.camel@decadent.org.uk>

On 10/08/2015 02:14 PM, Ben Hutchings wrote:
> On Tue, 2015-10-06 at 20:03 +0200, Markus Pargmann wrote:
>> The timeout handling introduced in
>> 	> 7e2893a16d3e (nbd: Fix timeout detection)
>> introduces a race condition which may lead to killing of tasks that are
>> not in nbd context anymore. This was not observed or reproducable yet.
>>
>> This patch adds locking to critical use of task_recv and task_send to
>> avoid killing tasks that already left the NBD thread functions. This
>> lock is only acquired if a timeout occures or the nbd device
>> starts/stops.
>>
>> Reported-by: Ben Hutchings <ben@decadent.org.uk>
>> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
>
> Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
>
> You could add 'Fixes: 7e2893a16d3e ("nbd: Fix timeout detection")' to
> the commit message as well.

I've added your review and the Fixes and added it for this series. 
Thanks guys.

-- 
Jens Axboe


  reply	other threads:[~2015-10-08 20:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17  6:19 [PULL 00/10] NBD updates for 4.3 Markus Pargmann
2015-08-17  6:20 ` [PATCH 01/10] nbd: Fix timeout detection Markus Pargmann
2015-09-28  0:27   ` Ben Hutchings
2015-10-01  6:04     ` Markus Pargmann
2015-10-06 18:03       ` [PATCH] nbd: Add locking for tasks Markus Pargmann
2015-10-08 20:14         ` Ben Hutchings
2015-10-08 20:21           ` Jens Axboe [this message]
2015-08-17  6:20 ` [PATCH 02/10] nbd: sock_shutdown, remove conditional lock Markus Pargmann
2015-08-17  6:20 ` [PATCH 03/10] nbd: restructure sock_shutdown Markus Pargmann
2015-08-17  6:20 ` [PATCH 04/10] nbd: Remove 'harderror' and propagate error properly Markus Pargmann
2015-08-17  6:20 ` [PATCH 05/10] nbd: Move clear queue debug message Markus Pargmann
2015-08-17  6:20 ` [PATCH 06/10] nbd: Remove variable 'pid' Markus Pargmann
2015-08-17  6:20 ` [PATCH 07/10] nbd: Add debugfs entries Markus Pargmann
2015-08-17  6:20 ` [PATCH 08/10] nbd: Change 'disconnect' to be boolean Markus Pargmann
2015-08-17  6:20 ` [PATCH 09/10] nbd: Rename functions for clearness of recv/send path Markus Pargmann
2015-08-17  6:20 ` [PATCH 10/10] nbd: flags is a u32 variable Markus Pargmann
2015-08-17 14:24 ` [PULL 00/10] NBD updates for 4.3 Jens Axboe

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=5616D065.6070708@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Hermann.Lauer@iwr.uni-heidelberg.de \
    --cc=belczyk@bsd.krakow.pl \
    --cc=ben@decadent.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpa@pengutronix.de \
    --cc=nbd-general@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox