lkml.org 
[lkml]   [2015]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] nbd: Add locking for tasks
From
Date
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



\
 
 \ /
  Last update: 2015-10-08 22:41    [W:0.061 / U:1.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site