From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07A53C25B4F for ; Tue, 7 May 2024 17:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=glO2LtKT3QglyuY7TVToGama5EERbWExBGoRCAPVxug=; b=SfQNFrMrQXr8F4 OxjKTVDQWzHlAVTqWa5WtRlEGtLg+I7KC5vNmGR+UQIg2EEdmIYPaZAF5tWPvqPlkWNohXF9EScqS TMVV5sfNrbJN3RFpVDc9P4nqxq3eJQ932RXrwLdHy+ooa7qvn7STBBZvKtA48J+L2vDW2WUvGqcxZ 6gOopI0RZazOu6eZEE7ZP18+ZaZ4T58RE0THYVNAayVSqT84U6NIOvsizIa4x5Q0R50l3z94yuJWM r5sowe7XeRziqkObClKtKXJDfotEe3j+3G+IQZOUzwrNuqgJMOnXJYLcA521Br/vaFVcvCiC6cKig xwMvShwiPw5+mVbUbUJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4P5B-0000000CHLs-0M5T; Tue, 07 May 2024 17:58:29 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4P58-0000000CHKv-41UY for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 17:58:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jhtPKTCf2rAFUz3lZJnxmPbFv+4BaiLF1W7Jae20gYI=; b=j/g0CEmrxGRCGwQVYvHY/UrX8a XrAAQ9UmOPxMRWI0rhRsrXX0d0Yx5EpPm8YrPkH34Svqe5xREnhckMam2p+ly12QRtE/hj2P03mtW yorPSYlbnkg9sGDE9uPI/af7s7at75lwPgVmv9fwe10NeaFGzw0LNpVa2Qnd9GdyIRv8IoGQpGMrS eIiwZEp98gf05AaM659uXZYcEhw2K9/c0+wO3x8okGCPWuDZ010R2hc1Xh50DLE+SpEfit90FAFVO gKTqREa+2WvZJj3wEwmeNw7qtuGWldAE+/iZ8A7uKgOHS1L6a1EKFzbdeE022S0ggsI0vROkAeM02 MEVPSkcg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34370) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s4P50-00047K-0H; Tue, 07 May 2024 18:58:18 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1s4P4y-0000Vr-JX; Tue, 07 May 2024 18:58:16 +0100 Date: Tue, 7 May 2024 18:58:16 +0100 From: "Russell King (Oracle)" To: =?iso-8859-1?Q?Andr=E9?= Draszik Cc: Marek Szyprowski , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Michael Turquette , Stephen Boyd Subject: Re: [PATCH] clkdev: fix potential NULL pointer dereference Message-ID: References: <20240507064434.3213933-1-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_105827_015750_DC6818FA X-CRM114-Status: GOOD ( 14.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 07, 2024 at 05:42:45PM +0100, Andr=E9 Draszik wrote: > Hi Marek, > = > On Tue, 2024-05-07 at 08:44 +0200, Marek Szyprowski wrote: > > diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c > > index ddacab7863d0..d2801ae70e34 100644 > > --- a/drivers/clk/clkdev.c > > +++ b/drivers/clk/clkdev.c > > @@ -194,10 +194,12 @@ vclkdev_alloc(struct clk_hw *hw, const char *con_= id, const char *dev_fmt, > > =A0 return &cla->cl; > > =A0 > > =A0fail: > > - fmt.fmt =3D dev_fmt; > > - fmt.va =3D &ap_copy; > > - pr_err("%pV:%s: %s ID is greater than %zu\n", > > - =A0=A0=A0=A0=A0=A0 &fmt, con_id, failure, max_size); > > + if (dev_fmt) { > > + fmt.fmt =3D dev_fmt; > > + fmt.va =3D &ap_copy; > > + pr_err("%pV:%s: %s ID is greater than %zu\n", > > + =A0=A0=A0=A0=A0=A0 &fmt, con_id, failure, max_size); > > + } > = > It might be nice to still print the rest of the error, so it's easier to = see which > clock is causing trouble. Good point. I'll fix the patch myself, merging the fix in. -- = RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel