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: <BF3F11EE-4110-49BE-8117-1F6205D86DB3@cavium.com>
Date:   Wed, 7 Jun 2017 22:42:03 +0000
From:   "Madhani, Himanshu" <Himanshu.Madhani@...ium.com>
To:     Colin King <colin.king@...onical.com>
CC:     Dept-Eng QLA2xxx Upstream <qla2xxx-upstream@...ium.com>,
        "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][scsi-next] scsi: qla2xxx: remove redundant null check on
 tgt


> On Jun 5, 2017, at 10:29 AM, Colin King <colin.king@...onical.com> wrote:
> 
> From: Colin Ian King <colin.king@...onical.com>
> 
> An earlier commit ed7fb808477b846bb2 ("scsi: qla2xxx: Remove
> redundant wait when target is stopped.") removed a null check
> on ha->tgt.tgt_ops and replaced it with a new check that null
> checked tgt, thus making the subsequent null check on tgt
> totally redundant. Remove it.
> 
> Detected by CoverityScan, CID#1440452 ("Logically Dead Code")
> 
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/scsi/qla2xxx/qla_target.c | 6 ------
> 1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
> index cb33ca87ca37..3594a76f6155 100644
> --- a/drivers/scsi/qla2xxx/qla_target.c
> +++ b/drivers/scsi/qla2xxx/qla_target.c
> @@ -5519,12 +5519,6 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha,
> 	if (!tgt || tgt->tgt_stop || tgt->tgt_stopped)
> 		return;
> 
> -	if (unlikely(tgt == NULL)) {
> -		ql_dbg(ql_dbg_tgt, vha, 0xe03a,
> -		    "ASYNC EVENT %#x, but no tgt (ha %p)\n", code, ha);
> -		return;
> -	}
> -
> 	if (((code == MBA_POINT_TO_POINT) || (code == MBA_CHG_IN_CONNECTION)) &&
> 	    IS_QLA2100(ha))
> 		return;
> -- 
> 2.11.0
> 

Looks good.

Acked-by: Himanshu Madhani <himanshu.madhani@...ium.com>

Thanks,
- Himanshu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ