• Nicholas Bellinger's avatar
    target: Re-add missing SCF_ACK_KREF assignment in v4.1.y · 527268df
    Nicholas Bellinger authored
    This patch fixes a regression in >= v4.1.y code where the original
    SCF_ACK_KREF assignment in target_get_sess_cmd() was dropped upstream
    in commit 054922bb, but the series for addressing TMR ABORT_TASK +
    LUN_RESET with fabric session reinstatement in commit febe562c still
    depends on this code in transport_cmd_finish_abort().
    
    The regression manifests itself as a se_cmd->cmd_kref +1 leak, where
    ABORT_TASK + LUN_RESET can hang indefinately for a specific I_T session
    for drivers using SCF_ACK_KREF, resulting in hung kthreads.
    
    This patch has been verified with v4.1.y code.
    Reported-by: default avatarVaibhav Tandon <vst@datera.io>
    Tested-by: default avatarVaibhav Tandon <vst@datera.io>
    Cc: Vaibhav Tandon <vst@datera.io>
    Cc: stable@vger.kernel.org # 4.1+
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    527268df
target_core_transport.c 83.7 KB