target: fix potential race window in target_sess_cmd_list_waiting()
target_sess_cmd_list_waiting() might hit on a condition where the kref for the command is already 0, but the destructor has not been called yet (or is stuck in waiting for a spin lock). Rather than leaving the command on the list we should explicitly remove it to avoid race issues later on. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
Showing
想要评论请 注册 或 登录