Messages in this thread | | | Subject | Re: [PATCH] nbd: Add locking for tasks | From | Jens Axboe <> | Date | Thu, 8 Oct 2015 14:21:57 -0600 |
| |
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
| |