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: <22d3d3fd-223b-4b33-9911-1dc4d6809075@lunn.ch>
Date: Fri, 26 Jan 2024 14:17:31 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Michal Vokáč <michal.vokac@...ft.com>
Cc: Florian Fainelli <f.fainelli@...il.com>,
	Vladimir Oltean <olteanv@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Christian Marangi <ansuelsmth@...il.com>,
	"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
	Marek Behún <kabel@...nel.org>,
	Christian Lamparter <chunkeey@...il.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, petr.benes@...ft.com
Subject: Re: [PATCH net v3] net: dsa: qca8k: fix illegal usage of GPIO

On Fri, Jan 26, 2024 at 11:49:35AM +0100, Michal Vokáč wrote:
> When working with GPIO, its direction must be set either when the GPIO is
> requested by gpiod_get*() or later on by one of the gpiod_direction_*()
> functions. Neither of this is done here which results in undefined
> behavior on some systems.
> 
> As the reset GPIO is used right after it is requested here, it makes sense
> to configure it as GPIOD_OUT_HIGH right away. With that, the following
> gpiod_set_value_cansleep(1) becomes redundant and can be safely
> removed.
> 
> Fixes: a653f2f538f9 ("net: dsa: qca8k: introduce reset via gpio feature")
> Signed-off-by: Michal Vokáč <michal.vokac@...ft.com>

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ