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]
Date:	Tue, 31 Mar 2015 14:07:00 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	u.kleine-koenig@...gutronix.de
Cc:	f.fainelli@...il.com, netdev@...r.kernel.org,
	linus.walleij@...aro.org, acourbot@...dia.com
Subject: Re: [PATCH] net: phy: at803x: simplify using
 devm_gpiod_get_optional and its 4th argument

From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Date: Tue, 31 Mar 2015 19:53:47 +0200

> On Tue, Mar 31, 2015 at 12:57:54PM -0400, David Miller wrote:
>> 1) It potentially leaves an error pointer in priv->gpiod_reset
>>    and I explicitly tell people to NEVER do this as it tests as
>>    non-NULL by cleanup code and therefore might be mistakenly
>>    used.
> If priv->gpiod_reset is an error value it makes the probe routine return
> this error (after point 2 is addressed), which should end the lifetime
> of the structure containing the value.

It doesn't matter, it's a dangerous practice and not doing so makes
sure that no matter how this code is ever changed nobody can run into
potential problems due to this.

>> I really hate changes like this, don't try to be too cute unless
>> you fully understand the full repurcussions and the reasons why
>> someone did things one way or another.
> I think I did understand the code, so I will resend with
> PTR_ERR_OR_ZERO assuming it was you who didn't understood my change
> regarding the other two issues you pointed out.

I'm not applying this patch if you keep putting error pointers into
the structure member.

Please do not fight me on this, I do not consider your changes an
improvement at all.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ