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: <766583ee1500472b8c1285bb2d9b0e9b@aladdin.ru>
Date: Mon, 12 Feb 2024 07:52:21 +0000
From: Daniil Dulov <D.Dulov@...ddin.ru>
To: Arend van Spriel <arend.vanspriel@...adcom.com>, Kalle Valo
	<kvalo@...eaurora.org>
CC: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
	Pieter-Paul Giesberts <pieterpg@...adcom.com>, "Franky (Zhenhui) Lin"
	<frankyl@...adcom.com>, "John W. Linville" <linville@...driver.com>, Kan Yan
	<kanyan@...adcom.com>, "linux-wireless@...r.kernel.org"
	<linux-wireless@...r.kernel.org>, "brcm80211-dev-list.pdl@...adcom.com"
	<brcm80211-dev-list.pdl@...adcom.com>, "SHA-cyfmac-dev-list@...ineon.com"
	<SHA-cyfmac-dev-list@...ineon.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "lvc-project@...uxtesting.org"
	<lvc-project@...uxtesting.org>
Subject: RE: [PATCH] brcmfmac: Remove unnecessary NULL-check.

Hello!

Thank you for the review! I'll correct the patch and send the 2nd version today.

Daniil Dulov


-----Original Message-----
From: Arend van Spriel [mailto:arend.vanspriel@...adcom.com] 
Sent: Sunday, February 11, 2024 10:27 PM
To: Daniil Dulov <D.Dulov@...ddin.ru>; Kalle Valo <kvalo@...eaurora.org>
Cc: David S. Miller <davem@...emloft.net>; Jakub Kicinski <kuba@...nel.org>; Pieter-Paul Giesberts <pieterpg@...adcom.com>; Franky (Zhenhui) Lin <frankyl@...adcom.com>; John W. Linville <linville@...driver.com>; Kan Yan <kanyan@...adcom.com>; linux-wireless@...r.kernel.org; brcm80211-dev-list.pdl@...adcom.com; SHA-cyfmac-dev-list@...ineon.com; netdev@...r.kernel.org; linux-kernel@...r.kernel.org; lvc-project@...uxtesting.org
Subject: Re: [PATCH] brcmfmac: Remove unnecessary NULL-check.

On 2/11/2024 8:25 PM, Arend van Spriel wrote:
> On 2/11/2024 4:05 PM, Daniil Dulov wrote:
>> In this case req will never be NULL, so remove unnecessary check.
>>
>> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Looks good to me, but when do we call things a "fix" and when is 
> "improvement" more appropriate.
> 
>> Fixes: 71bb244ba2fd ("brcm80211: fmac: add USB support for 
>> bcm43235/6/8 chipsets")
> Reviewed-by: Arend van Spriel <arend.vanspriel@...adcom.com>
>> Signed-off-by: Daniil Dulov <d.dulov@...ddin.ru>
>> ---
>>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c 
>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
>> index 9fb68c2dc7e3..38e4e4f32a39 100644
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
>> @@ -455,8 +455,7 @@ brcmf_usbdev_qinit(struct list_head *q, int qsize)
>>       brcmf_err("fail!\n");
>>       while (!list_empty(q)) {
>>           req = list_entry(q->next, struct brcmf_usbreq, list);
>> -        if (req)
>> -            usb_free_urb(req->urb);
>> +        usb_free_urb(req->urb);
>>           list_del(q->next);
>>       }
> 
> Ay you are already touching this code you could consider using 
> list_for_each_entry_safe().

That "Ay you are ..." should be "As you are ...".

>>       kfree(reqs);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ