2ad5482b51
'close()' calls 'stop()' and 'stop()' cancels pthread without any check. Calling 'stop()' & 'close()' sequentially tries to cancel pthread twice which will cause a crash. Adding a state check in 'stop()' before canceling the pthread to prevent multiple stop. Fixes: 696fbc7bb4fc ("net/kni: remove resources when port is closed") Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Tested-by: Yinan Wang <yinan.wang@intel.com>