Re: [PATCH] iscsi-target: fix iscsi cmd leak

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

 



Hi Varun,

Apologies for the delayed follow-up on this.  Comments below.

On Thu, 2016-09-15 at 21:20 +0530, Varun Prakash wrote:
> If iscsi-target receives NOP OUT with ITT and TTT
> set to 0xffffffff it allocates iscsi_cmd but
> does not free the cmd, so free iscsi_cmd in this case.
> 
> Signed-off-by: Varun Prakash <varun@xxxxxxxxxxx>
> ---
>  drivers/target/iscsi/iscsi_target.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
> index 39b928c..924be4e 100644
> --- a/drivers/target/iscsi/iscsi_target.c
> +++ b/drivers/target/iscsi/iscsi_target.c
> @@ -1804,6 +1804,10 @@ int iscsit_process_nop_out(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
>  	 * Otherwise, initiator is not expecting a NOPIN is response.
>  	 * Just ignore for now.
>  	 */
> +
> +	if (cmd)
> +		iscsit_free_cmd(cmd, false);
> +
>          return 0;
>  }
>  EXPORT_SYMBOL(iscsit_process_nop_out);

Nice catch on this.  Applied to target-pending/master.

Thank you.

--
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