Re: [PATCH 1/1] iscsi target: fix oops when adding reject pdu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2015-04-10 at 02:47 -0500, michaelc@xxxxxxxxxxx wrote:
> From: Mike Christie <michaelc@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxx>
> ---
>  drivers/target/iscsi/iscsi_target.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
> index 2accb6e..0760c4b 100644
> --- a/drivers/target/iscsi/iscsi_target.c
> +++ b/drivers/target/iscsi/iscsi_target.c
> @@ -1181,7 +1181,7 @@ iscsit_handle_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
>  	 * traditional iSCSI block I/O.
>  	 */
>  	if (iscsit_allocate_iovecs(cmd) < 0) {
> -		return iscsit_add_reject_cmd(cmd,
> +		return iscsit_reject_cmd(cmd,
>  				ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
>  	}
>  	immed_data = cmd->immediate_data;

Applied to target-pending/master, with a stable CC' for v3.10.

Thanks MNC!

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux