+27
−2
Loading
There was a race between spdk_thread_exit() and spdk_for_each_channel(). A SPDK thread should not move to EXITED until spdk_for_each_channel() completes especially if the SPDK thread is the caller. Realize this adding a counter to spdk_thread structure and using it. spdk_for_each_thread() has the same issue. Hence, fix spdk_for_each_thread() together. Verify this by simple unit test cases. Fixes #3201 Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: If6be50cf3204d13f71596bbbb84f4de0f9adfcec Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20788 Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com>