summaryrefslogtreecommitdiff
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2015-10-06 20:03:54 +0200
committerJens Axboe <axboe@fb.com>2015-10-08 14:21:24 -0600
commitdcc909d90ccdbb73226397ff6d298f7af35b0e11 (patch)
treebce78076d417b467bfe3a4da807fe78e0e963059 /mm/page-writeback.c
parentc3984cc994377671f18d3d719ddd86b5107457ee (diff)
nbd: Add locking for tasks
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> Fixes: 7e2893a16d3e ("nbd: Fix timeout detection") Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'mm/page-writeback.c')
0 files changed, 0 insertions, 0 deletions