summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedi/qedi_main.c
diff options
context:
space:
mode:
authorMike Christie2018-08-27 21:45:16 +0200
committerMartin K. Petersen2018-08-30 13:07:12 +0200
commit05a86e78ea9823ec25b3515db078dd8a76fc263c (patch)
tree47b7cd2caed9db4f3de6f98d6cc96cfac2229b98 /drivers/scsi/qedi/qedi_main.c
parentscsi: iscsi: target: Set conn->sess to NULL when iscsi_login_set_conn_values ... (diff)
downloadkernel-qcow2-linux-05a86e78ea9823ec25b3515db078dd8a76fc263c.tar.gz
kernel-qcow2-linux-05a86e78ea9823ec25b3515db078dd8a76fc263c.tar.xz
kernel-qcow2-linux-05a86e78ea9823ec25b3515db078dd8a76fc263c.zip
scsi: iscsi: target: Fix conn_ops double free
If iscsi_login_init_conn fails it can free conn_ops. __iscsi_target_login_thread will then call iscsi_target_login_sess_out which will also free it. This fixes the problem by organizing conn allocation/setup into parts that are needed through the life of the conn and parts that are only needed for the login. The free functions then release what was allocated in the alloc functions. With this patch we have: iscsit_alloc_conn/iscsit_free_conn - allocs/frees the conn we need for the entire life of the conn. iscsi_login_init_conn/iscsi_target_nego_release - allocs/frees the parts of the conn that are only needed during login. Signed-off-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedi/qedi_main.c')
0 files changed, 0 insertions, 0 deletions