aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2024-08-30 11:41:45 +0800
committerJens Axboe <[email protected]>2024-08-30 14:46:59 -0600
commitc9ea57c91f03bcad415e1a20113bdb2077bcf990 (patch)
tree5865f68b6cbf4a769432fbcda17dde2fd229ece2 /tools/perf/util/scripting-engines/trace-event-python.c
parent12c612e115f3f021e72025447233ca89c94fb751 (diff)
nbd: fix race between timeout and normal completion
If request timetout is handled by nbd_requeue_cmd(), normal completion has to be stopped for avoiding to complete this requeued request, other use-after-free can be triggered. Fix the race by clearing NBD_CMD_INFLIGHT in nbd_requeue_cmd(), meantime make sure that cmd->lock is grabbed for clearing the flag and the requeue. Cc: Josef Bacik <[email protected]> Cc: Yu Kuai <[email protected]> Fixes: 2895f1831e91 ("nbd: don't clear 'NBD_CMD_INFLIGHT' flag if request is not completed") Signed-off-by: Ming Lei <[email protected]> Reviewed-by: Yu Kuai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions