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] [day] [month] [year] [list]
Message-ID: <56C60347.7040506@redhat.com>
Date:	Thu, 18 Feb 2016 12:45:43 -0500
From:	Doug Ledford <dledford@...hat.com>
To:	Insu Yun <wuninsu@...il.com>, faisal.latif@...el.com,
	sean.hefty@...el.com, hal.rosenstock@...il.com,
	linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
	taesoo@...ech.edu, yeongjin.jang@...ech.edu, insu@...ech.edu,
	changwoo@...ech.edu
Subject: Re: [PATCH] nes: handling failed allocation when creating workqueue

On 2/17/2016 11:59 PM, Leon Romanovsky wrote:
> Please see my minor comments below.
> Reviewed-by: Leon Romanovsky <leon@...n.nu>
> 
> On Wed, Feb 17, 2016 at 01:06:33PM -0500, Insu Yun wrote:
>> Since create_singlethread_workqueue uses kzalloc internally, 
>> it can be failed in memory pressure, so need to handle it.
> 
> s/can be failed/can fail/
> 
>>
>> Signed-off-by: Insu Yun <wuninsu@...il.com>
>> ---
>>  drivers/infiniband/hw/nes/nes_cm.c | 13 ++++++++++++-
>>  1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
>> index cb9f0f2..23afad6 100644
>> --- a/drivers/infiniband/hw/nes/nes_cm.c
>> +++ b/drivers/infiniband/hw/nes/nes_cm.c
>> @@ -2833,7 +2833,7 @@ static struct nes_cm_core *nes_cm_alloc_core(void)
>>  	/* alloc top level core control structure */
>>  	cm_core = kzalloc(sizeof(*cm_core), GFP_KERNEL);
>>  	if (!cm_core)
>> -		return NULL;
>> +		goto enomem_3;
> 
> IMHO, there is no need to define goto label for one return.

I made the touchups Leon suggested, and a touchup of my own, but it is
now applied, thanks.



Download attachment "signature.asc" of type "application/pgp-signature" (885 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ