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: <afd1b55c-c5d2-237d-7727-31f7305decaa@huawei.com>
Date:   Wed, 12 Jul 2017 14:51:59 +0100
From:   John Garry <john.garry@...wei.com>
To:     Yijing Wang <wangyijing@...wei.com>, <jejb@...ux.vnet.ibm.com>,
        <martin.petersen@...cle.com>
CC:     <chenqilin2@...wei.com>, <hare@...e.com>,
        <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <chenxiang66@...ilicon.com>, <huangdaode@...ilicon.com>,
        <wangkefeng.wang@...wei.com>, <zhaohongjiang@...wei.com>,
        <dingtianhong@...wei.com>, <guohanjun@...wei.com>,
        <yanaijie@...wei.com>, <hch@....de>, <dan.j.williams@...el.com>,
        <emilne@...hat.com>, <thenzl@...hat.com>, <wefu@...hat.com>,
        <charles.chenxin@...wei.com>, <chenweilong@...wei.com>,
        Johannes Thumshirn <jthumshirn@...e.de>,
        Linuxarm <linuxarm@...wei.com>
Subject: Re: [PATCH v3 6/7] libsas: add wait-complete support to sync
 discovery event

On 10/07/2017 08:06, Yijing Wang wrote:
>
>  static void sas_chain_event(int event, unsigned long *pending,
> @@ -592,9 +596,9 @@ int sas_discover_event(struct asd_sas_port *port, enum discover_event ev)
>  {
>  	struct sas_discovery *disc;
>
> +	disc = &port->disc;
>  	if (!port)
>  		return 0;
> -	disc = &port->disc;
>
>  	BUG_ON(ev >= DISC_NUM_EVENTS);
>
> diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
> index 570b2cb..9d26c28 1

I was just looking through the code and I noticed this, above. Is there 
a specific reason to move the NULL check, or was it modified accidentally?

I mean, if port is NULL I don't think we would get as far as checking it 
as we would have already de-referenced it.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ