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-next>] [day] [month] [year] [list]
Date:   Fri,  6 Nov 2020 09:46:15 +0800
From:   Wang Qing <wangqing@...o.com>
To:     Hartley Sweeten <hsweeten@...ionengravers.com>,
        Alexander Sverdlin <alexander.sverdlin@...il.com>,
        Russell King <linux@...linux.org.uk>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:     Wang Qing <wangqing@...o.com>
Subject: [PATCH] arm: Add clk_get_rate input parameter null check

The input parameter of clk_get_rate() is checked with IS_ERR(),
so here we need to check null on clk.

Signed-off-by: Wang Qing <wangqing@...o.com>
---
 arch/arm/mach-ep93xx/clock.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
index 2810eb5..4313b2f
--- a/arch/arm/mach-ep93xx/clock.c
+++ b/arch/arm/mach-ep93xx/clock.c
@@ -321,6 +321,9 @@ static unsigned long get_uart_rate(struct clk *clk)
 
 unsigned long clk_get_rate(struct clk *clk)
 {
+	if (!clk)
+		return 0;
+
 	if (clk->get_rate)
 		return clk->get_rate(clk);
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ