summaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-12-12 08:53:40 -0700
committerJens Axboe <axboe@fb.com>2014-12-12 08:53:40 -0700
commit849c6e7746e4f6317ace6aa7d2fcdcd844e99ddb (patch)
treea46e807ce51483393beb9e1d8c1ed331e9a023ca /tools/perf
parentfe54303ee2be293c1c5c7a53a152453789cabc2f (diff)
downloadlinux-stable-849c6e7746e4f6317ace6aa7d2fcdcd844e99ddb.tar.gz
linux-stable-849c6e7746e4f6317ace6aa7d2fcdcd844e99ddb.tar.bz2
linux-stable-849c6e7746e4f6317ace6aa7d2fcdcd844e99ddb.zip
NVMe: fix race condition in nvme_submit_sync_cmd()
If we have a race between the schedule timing out and the command completing, we could have the task issuing the command exit nvme_submit_sync_cmd() while the irq is running sync_completion(). If that happens, we could be corrupting memory, since the stack that held 'cmdinfo' is no longer valid. Fix this by always calling nvme_abort_cmd_info(). Once that call completes, we know that we have either run sync_completion() if the completion came in, or that we will never run it since we now have special_completion() as the command callback handler. Acked-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions