lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20120818.175337.1305564732068169507.fujita.tomonori@lab.ntt.co.jp>
Date:	Sat, 18 Aug 2012 17:53:37 +0900 (JST)
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	dan.carpenter@...cle.com
Cc:	bprakash@...adcom.com, JBottomley@...allels.com,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch] [SCSI] bnx2fc: zero out sense buffer properly

On Sat, 18 Aug 2012 11:46:37 +0300
Dan Carpenter <dan.carpenter@...cle.com> wrote:

> ->sense_buffer used to be an array but it changed to pointer in
> de25deb180 "[SCSI] use dynamically allocated sense buffer".  This call
> to memset() needs to be updated as well.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index 73f231c..8d4626c 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1807,7 +1807,7 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,
>  			fcp_sns_len = SCSI_SENSE_BUFFERSIZE;
>  		}
>  
> -		memset(sc_cmd->sense_buffer, 0, sizeof(sc_cmd->sense_buffer));
> +		memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);

I guess that you can remove the line instead. IIRC, scsi-ml does it
for LLDs.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ