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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  5 May 2020 15:09:53 +0100
From:   Marc Zyngier <>
Cc:     Guenter Roeck <>,
        Stephen Boyd <>,
        Michael Turquette <>
Subject: [PATCH] clk: Unlink clock if failed to prepare or enable

On failing to prepare or enable a clock, remove the core structure
from the list it has been inserted as it is about to be freed.

This otherwise leads to random crashes when subsequent clocks get
registered, during which parsing of the clock tree becomes adventurous.

Observed with QEMU's RPi-3 emulation.

Fixes: 12ead77432f2 ("clk: Don't try to enable critical clocks if prepare failed")
Signed-off-by: Marc Zyngier <>
Cc: Guenter Roeck <>
Cc: Stephen Boyd <>
Cc: Michael Turquette <>
 drivers/clk/clk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index b34fc1d3a594..752e8eef3f55 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3522,6 +3522,9 @@ static int __clk_core_init(struct clk_core *core)
+	if (ret)
+		hlist_del_init(&core->child_node);
 	if (!ret)

Powered by blists - more mailing lists