• Nicholas Bellinger's avatar
    qla2xxx: Fix qlt_lport_register base_vha callback race · ddb95145
    Nicholas Bellinger authored
    This patch closes a race between qlt_lport_register() and
    tcm_qla2xxx callback logic by holding qla_tgt_mutex before
    making the callback.
    
    In order for this to work, the qlt_add_target() and
    qlt_remove_target() code has been changed to avoid the
    accessing qla_tgt_mutex + list_[add,del] for NPIV enabled
    ports.
    
    This bug introduced in v3.14-rc1 code with commit 49a47f2c.
    
    Cc: Sawan Chandak <sawan.chandak@qlogic.com>
    Cc: Quinn Tran <quinn.tran@qlogic.com>
    Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
    Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    ddb95145
qla_target.c 134 KB