+1
−0
+1
−1
+1
−1
Loading
struct spdk_nvmf_request is re-used by the transport layer for subsequent requests. The transports have inconsistent clearing of these flags, which can cause some dangerous bugs when the request structure is reused. The recent nvmf reservation serialization changes rely on the reservation_queued flag and if that was set due to reuse, the reservation would not be queued and will be dropped if an existing reservation request was in-progross. If nothing is in-progress, the request would continue without being enqueued. The flags have a uint8_t union'd with them, so we can clear that for each transport. tcp clears in the get request while rdma and fc clear in the free request function. Add unit test to validate tcp requests have cleared flags. Change-Id: I66bcc2ce7cc4bcdd590336160e8a7aa6629e2c5b Signed-off-by:Joel Cunningham <joel.cunningham@oracle.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26697 Community-CI: Mellanox Build Bot Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by:
Jacek Kalwas <jacek.kalwas@nutanix.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com>