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: <f76e1ffb-1642-1e7f-ccc8-a45c8fc13aa9@broadcom.com>
Date:	Thu, 28 Jul 2016 07:58:38 -0700
From:	James Smart <james.smart@...adcom.com>
To:	Johannes Thumshirn <jthumshirn@...e.de>,
	"Martin K . Petersen" <martin.petersen@...cle.com>,
	James Bottomley <jejb@...ux.vnet.ibm.com>
Cc:	James Smart <james.smart@...gotech.com>,
	Dick Kennedy <dick.kennedy@...gotech.com>,
	Linux SCSI Mailinglist <linux-scsi@...r.kernel.org>,
	Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] lpfc: Fix possible NULL pointer dereference

This patch is good. Thanks

-- james

Signed-off-by: James Smart  <james.smart@...adcom.com>


On 6/15/2016 6:00 AM, Johannes Thumshirn wrote:
> Check for the existance of pciob->vport before accessing it.
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
> ---
>   drivers/scsi/lpfc/lpfc_sli.c | 13 ++++---------
>   1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index 70edf21..134078f 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -1329,15 +1329,10 @@ lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
>   	if ((unlikely(pring->ringno == LPFC_ELS_RING)) &&
>   	   (piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) &&
>   	   (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN) &&
> -	 (!(piocb->vport->load_flag & FC_UNLOADING))) {
> -		if (!piocb->vport)
> -			BUG();
> -		else
> -			mod_timer(&piocb->vport->els_tmofunc,
> -				jiffies +
> -				msecs_to_jiffies(1000 * (phba->fc_ratov << 1)));
> -	}
> -
> +	    piocb->vport && !(piocb->vport->load_flag & FC_UNLOADING))
> +		mod_timer(&piocb->vport->els_tmofunc,
> +			  jiffies +
> +			  msecs_to_jiffies(1000 * (phba->fc_ratov << 1)));
>   
>   	return 0;
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ