summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_auth.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2017-10-27 12:32:59 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2017-11-07 19:51:23 -0800
commitae072726f6109bb1c94841d6fb3a82dde298ea85 (patch)
tree2de91dfef6e38343b09d0b8d568e8d51f43faa62 /drivers/target/iscsi/iscsi_target_auth.c
parent1c21a48055a67ceb693e9c2587824a8de60a217c (diff)
downloadblackbird-obmc-linux-ae072726f6109bb1c94841d6fb3a82dde298ea85.tar.gz
blackbird-obmc-linux-ae072726f6109bb1c94841d6fb3a82dde298ea85.zip
iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref
Since commit 59b6986dbf fixed a potential NULL pointer dereference by allocating a se_tmr_req for ISCSI_TM_FUNC_TASK_REASSIGN, the se_tmr_req is currently leaked by iscsit_free_cmd() because no iscsi_cmd->se_cmd.se_tfo was associated. To address this, treat ISCSI_TM_FUNC_TASK_REASSIGN like any other TMR and call transport_init_se_cmd() + target_get_sess_cmd() to setup iscsi_cmd->se_cmd.se_tfo with se_cmd->cmd_kref of 2. This will ensure normal release operation once se_cmd->cmd_kref reaches zero and target_release_cmd_kref() is invoked, se_tmr_req will be released via existing target_free_cmd_mem() and core_tmr_release_req() code. Reported-by: Donald White <dew@datera.io> Cc: Donald White <dew@datera.io> Cc: Mike Christie <mchristi@redhat.com> Cc: Hannes Reinecke <hare@suse.com> Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_auth.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud