Jens Axboe 849c6e7746 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>
2014-12-12 08:53:40 -07:00
..
2014-08-21 20:42:01 -05:00
2013-04-09 14:13:19 -04:00
2014-08-08 15:57:28 -07:00
2011-08-08 11:40:15 +02:00
2014-08-08 15:57:28 -07:00
2014-01-30 16:56:55 -08:00
2013-06-29 12:46:45 +04:00
2014-01-30 16:56:55 -08:00
2014-11-04 13:18:52 -07:00
2013-11-08 09:10:30 -07:00
2014-10-31 15:49:45 -04:00