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: <5940FC1C.5050000@huawei.com>
Date:   Wed, 14 Jun 2017 17:04:28 +0800
From:   wangyijing <wangyijing@...wei.com>
To:     Johannes Thumshirn <jthumshirn@...e.de>, <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>,
        Yousong He <heyousong@...wei.com>
Subject: Re: [PATCH v2 1/2] libsas: Don't process sas events in static works

>>  static void notify_ha_event(struct sas_ha_struct *sas_ha, enum ha_event event)
>>  {
>> +	struct sas_ha_event *ev;
>> +
>>  	BUG_ON(event >= HA_NUM_EVENTS);
>>  
>> -	sas_queue_event(event, &sas_ha->pending,
>> -			&sas_ha->ha_events[event].work, sas_ha);
>> +	ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
>> +	if (!ev)
>> +		return;
> GFP_ATOMIC allocations can fail and then no events will be queued *and* we
> don't report the error back to the caller.
> 

Yes, it's really a problem, but I don't find a better solution, do you have some suggestion ?

> 
> 
>> index 64e9cdd..c227a8b 100644
>> --- a/drivers/scsi/libsas/sas_init.c
>> +++ b/drivers/scsi/libsas/sas_init.c
>> @@ -111,10 +111,6 @@ void sas_hash_addr(u8 *hashed, const u8 *sas_addr)
>>  
>>  void sas_hae_reset(struct work_struct *work)
>>  {
>> -	struct sas_ha_event *ev = to_sas_ha_event(work);
>> -	struct sas_ha_struct *ha = ev->ha;
>> -
>> -	clear_bit(HAE_RESET, &ha->pending);
>>  }
> 
> I don't really get why you need a stubbed out sas_hae_reset(). Can't we
> just kill it if it doesn't have anything left to do?

I have no idea about this function history, I agree clean it out.

> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ