On 12/1/20 3:29 PM, Mike Christie wrote:
The conn_send_pdu API is evil in that it returns a pointer to a iscsi_task, but that task might have been freed already. This would happen with the ping_task code. To fix up the API so the caller can access the task if it needs to like in the ping_task case, this has conn_send_pdu grab a ref to the task for the caller. We then move the ping_task clearing to when all the refcounts are dropped, so we know the caller and a completion do not race.
Ignore this patch. It's wrong, because it doesn't handle the check for if the nop is from userspace or kernel.