+2
−1
Loading
Each request has a callback context as cb_arg, and the callback to nvme_complete_request() for the completed request may reuse the context to the new request. On the other hand, nvme_pcie_qpair_complete_tracker() dequeues tr from pqpair->outstanding_tr after calling nvme_complete_request() for the request pointed by tr. Hence while nvme_complete_request() is executed, pqpair->outstanding_tr may have two requests which has the same callback context, the completed request and the new submitted request. The upcoming patch will search all requests whose cb_arg matches to abort them. In the above case, the search may find two requests by mistake. To avoid such error, change nvme_pcie_qpair_complete_tracker() to dequeue tr from pqpair->outstanding_tr before calling nvme_complete_request(). Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ie9efc200d06d02d8ee2be3cb8e9fd64591bc210d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2861 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by:
Michael Haeuptle <michaelhaeuptle@gmail.com>