Skip to content
Commit 1a0274f0 authored by Bijan Mottahedeh's avatar Bijan Mottahedeh Committed by Paul Gortmaker
Browse files

nvme-pci: Hold cq_poll_lock while completing CQEs

commit 9515743b upstream.

Completions need to consumed in the same order the controller submitted
them, otherwise future completion entries may overwrite ones we haven't
handled yet. Hold the nvme queue's poll lock while completing new CQEs to
prevent another thread from freeing command tags for reuse out-of-order.

Fixes: dabcefab

 ("nvme: provide optimized poll function for separate poll queues")
Signed-off-by: default avatarBijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 78ac18b4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment