Re: [PATCH v2] scsi: elx: efct: fix target session lifetime against node teardown
From: Yehyeong Lee
Date: Wed Oct 21 2026 - 10:37:03 EST
Thanks for the review. Two of the three points are right, and v3 fixes
them.
Both came from the backend reporting a synchronous completion while the
setup work was still in flight. efct_scsi_new_initiator() returned
EFC_SCSI_CALL_COMPLETE for a duplicate PRLI, and efct_scsi_del_initiator()
returned it when it handed the in-flight setup to teardown, so
efc_d_send_prli_rsp() and __efc_d_initiate_shutdown() advanced the node
before the work had registered or unwound the session. v3 returns
EFC_SCSI_CALL_ASYNC in both cases and lets the setup work post the one
completion it owes, through efc_scsi_del_initiator_complete() or
efc_scsi_sess_reg_complete().
The third, the window around efc_scsi_sess_reg_complete(), stays memory
safe because the work now holds a node reference across it. The second
efc_node_free() it describes is a pre-existing path in efc_node_free()
that this patch does not change.
v3 is at
https://lore.kernel.org/r/20261021142818.2782104-1-yhlee@xxxxxxxxxxxxxxxxxx