]> git.baikalelectronics.ru Git - kernel.git/commit
iscsi target: fix oops when adding reject pdu
authorMike Christie <michaelc@cs.wisc.edu>
Fri, 10 Apr 2015 07:47:27 +0000 (02:47 -0500)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 10 Apr 2015 19:33:55 +0000 (12:33 -0700)
commitf5d8061eb8a30e22ecba49e74a66b29345e6b7b1
treea166cf4883b28f3cd3f6f10b3bfa3216a4daadf4
parent3a11fdf27ee60b5a3dc4d827c173402c3df03510
iscsi target: fix oops when adding reject pdu

This fixes a oops due to a double list add when adding a reject PDU for
iscsit_allocate_iovecs allocation failures. The cmd has already been
added to the conn_cmd_list in iscsit_setup_scsi_cmd, so this has us call
iscsit_reject_cmd.

Note that for ERL0 the reject PDU is not actually sent, so this patch
is not completely tested. Just verified we do not oops. The problem is the
add reject functions return -1 which is returned all the way up to
iscsi_target_rx_thread which for ERL0 will drop the connection.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c