+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, TCP transport dequeues tcp_req from tqpair->outstanding_reqs after calling nvme_complete_request() for the request pointe by tcp_req. Hence while nvme_complete_request() is executed, tqpair->outstanding_reqs 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, move dequeueing tcp_req from tqpair->outstanding_reqs before calling nvme_request_complete(). One exception is the case that only nvme_tcp_req_put() is called. For the case remove tcp_req from tqpair->outstanding_reqs before calling nvme_tcp_req_put(). Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I5f2ac292c60431ac1e27b8657db92b220860a0a8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2865 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Michael Haeuptle <michaelhaeuptle@gmail.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com>