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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1203473618.3103.37.camel@localhost.localdomain>
Date:	Tue, 19 Feb 2008 20:13:38 -0600
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Adrian Bunk <bunk@...nel.org>
Cc:	David Somayajulu <david.somayajulu@...gic.com>,
	linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: [2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code

On Tue, 2008-02-19 at 21:29 +0200, Adrian Bunk wrote:
> This patch removes dead code spotted by the Coverity checker.
> 
> Signed-off-by: Adrian Bunk <bunk@...nel.org>
> 
> ---
> 
>  drivers/scsi/qla4xxx/ql4_isr.c |   18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
> 
> --- linux-2.6/drivers/scsi/qla4xxx/ql4_isr.c.old	2008-02-19 20:29:16.000000000 +0200
> +++ linux-2.6/drivers/scsi/qla4xxx/ql4_isr.c	2008-02-19 20:30:37.000000000 +0200
> @@ -91,38 +91,22 @@ static void qla4xxx_status_entry(struct 
>  		if (scsi_status == 0) {
>  			cmd->result = DID_OK << 16;
>  			break;
>  		}
>  
>  		if (sts_entry->iscsiFlags & ISCSI_FLAG_RESIDUAL_OVER) {
>  			cmd->result = DID_ERROR << 16;
>  			break;
>  		}
>  
> -		if (sts_entry->iscsiFlags &ISCSI_FLAG_RESIDUAL_UNDER) {
> +		if (sts_entry->iscsiFlags &ISCSI_FLAG_RESIDUAL_UNDER)
>  			scsi_set_resid(cmd, residual);
> -			if (!scsi_status && ((scsi_bufflen(cmd) - residual) <
> -				cmd->underflow)) {
> -
> -				cmd->result = DID_ERROR << 16;
> -
> -				DEBUG2(printk("scsi%ld:%d:%d:%d: %s: "
> -					"Mid-layer Data underrun0, "
> -					"xferlen = 0x%x, "
> -					"residual = 0x%x\n", ha->host_no,
> -					cmd->device->channel,
> -					cmd->device->id,
> -					cmd->device->lun, __func__,
> -					scsi_bufflen(cmd), residual));
> -				break;
> -			}
> -		}

This code doesn't look dead to me, it looks to be enforcing
cmd->underrun if set ... what makes the coverity checker think it can
never be executed?

James


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