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]
Date:	Wed, 12 Nov 2014 22:28:41 +0100
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	Dan Carpenter <dan.carpenter@...cle.com>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, trivial@...nel.org,
	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
	Coccinelle <cocci@...teme.lip6.fr>
Subject: Re: [PATCH v2 1/2] staging: rtl8188eu: Deletion of unnecessary checks
 before three function calls

>> @@ -487,8 +488,7 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
>>  	DBG_88E("+r871xu_dev_remove, hw_init_completed=%d\n",
>>  		if1->hw_init_completed);
>>  	rtw_free_drv_sw(if1);
>> -	if (pnetdev)
>> -		rtw_free_netdev(pnetdev);
>> +	rtw_free_netdev(pnetdev);
> 
> I still feel that hiding the if statement inside the function call makes
> the code more subtle and it is a bad harmful thing to do.

I find your feedback interesting.


> This is especially true if you have trained yourself to know that
> free_netdev() can't accept NULL pointers.

Do you need to adjust your concerns a bit over time when function variants
provide a corresponding safety check in their implementations?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ