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: <000201db54e0$64f8dc40$2eea94c0$@samsung.com>
Date: Mon, 23 Dec 2024 07:44:25 +0530
From: "Pankaj Dubey" <pankaj.dubey@...sung.com>
To: "'Rob Herring \(Arm\)'" <robh@...nel.org>, "'Lee Jones'"
	<lee@...nel.org>, "'Arnd Bergmann'" <arnd@...db.de>, "'Heiko Stuebner'"
	<heiko@...ech.de>, "'Liviu Dudau'" <liviu.dudau@....com>, "'Sudeep Holla'"
	<sudeep.holla@....com>, "'Lorenzo	Pieralisi'" <lpieralisi@...nel.org>
Cc: "'Peter Griffin'" <peter.griffin@...aro.org>, "'Will McVicker'"
	<willmcvicker@...gle.com>, "'John Madieu'" <john.madieu.xa@...renesas.com>,
	"'Krzysztof Kozlowski'" <krzysztof.kozlowski@...aro.org>,
	<linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v2 1/3] mfd: syscon: Fix race in
 device_node_get_regmap()



> -----Original Message-----
> From: Rob Herring (Arm) <robh@...nel.org>
> Sent: Tuesday, December 17, 2024 11:42 PM
> To: Lee Jones <lee@...nel.org>; Arnd Bergmann <arnd@...db.de>; Pankaj
> Dubey <pankaj.dubey@...sung.com>; Heiko Stuebner <heiko@...ech.de>;
> Liviu Dudau <liviu.dudau@....com>; Sudeep Holla <sudeep.holla@....com>;
> Lorenzo Pieralisi <lpieralisi@...nel.org>
> Cc: Peter Griffin <peter.griffin@...aro.org>; Will McVicker
> <willmcvicker@...gle.com>; John Madieu <john.madieu.xa@...renesas.com>;
> Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>; linux-
> kernel@...r.kernel.org; linux-arm-kernel@...ts.infradead.org
> Subject: [PATCH v2 1/3] mfd: syscon: Fix race in device_node_get_regmap()
> 
> It is possible for multiple, simultaneous callers calling
> device_node_get_regmap() with the same node to fail to find an entry in the
> syscon_list. There is a period of time while the first caller is calling
> of_syscon_register() that subsequent callers also fail to find an entry in the
> syscon_list and then call of_syscon_register() a second time.
> 
> Fix this by keeping the lock held until after of_syscon_register() completes and
> adds the node to syscon_list. Convert the spinlock to a mutex as many of the
> functions called in of_syscon_register() such as
> kzalloc() and of_clk_get() may sleep.
> 
> Fixes: bdb0066df96e ("mfd: syscon: Decouple syscon interface from platform
> devices")
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> Signed-off-by: Rob Herring (Arm) <robh@...nel.org>
> ---

Reviewed-by: Pankaj Dubey <pankaj.dubey@...sung.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ