Loading
bdev/nvme: fix race between controller destruction and reset
We have the following race condition - 1. A controller reset is in progress (iterating through channels). 2. The controller is being removed/destroyed at the same time. 3. The iterator visits a channel that has a connect_poller active. 4. The channel is destroyed (in 'bdev_nvme_destroy_ctrlr_channel_cb'), but the connect_poller is left running. 5. The connect_poller fires after the qpair has been freed, thus hitting the assertion failure `qpair != NULL`. Fix: Unregister the 'connect_poller' when disconnecting the qpair in 'bdev_nvme_destroy_ctrlr_channel_cb'. Change-Id: I503cc5e56dae35bd30e68b4867c900d1a0bf5a89 Signed-off-by:Vineet Madan <vineet.madan@nutanix.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26821 Reviewed-by:
Jacek Kalwas <jacek.kalwas@nutanix.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com>