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 X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC5C5C433DB for ; Mon, 28 Dec 2020 15:03:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86F25223E8 for ; Mon, 28 Dec 2020 15:03:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408139AbgL1PCr (ORCPT ); Mon, 28 Dec 2020 10:02:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:47222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439960AbgL1OMt (ORCPT ); Mon, 28 Dec 2020 09:12:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 46F7A22AAA; Mon, 28 Dec 2020 14:12:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164753; bh=dV46qeBfPLQJJtP+a2mxDy22q/gjmHpFLrDFTHvHiS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GLFsseufUZdrgfUTEKMCwaYPhBNvad8gBO2t4t3aiwR1uDWeR/U8a1iTRaDmawP0C NqcYYGA6iEmPd6+yjmhMZK6Wsezuj8DUGGa7PAK08H1BJf1ahR7SjGTrvshUmEkwu9 qMJgmcK4urWKpYzPtyWv3Zhc3MIDb5clUZXkIR+0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Daniel Lezcano , Paul Cercueil , =?UTF-8?q?=E5=91=A8=E7=90=B0=E6=9D=B0=20 ?= , Sasha Levin Subject: [PATCH 5.10 287/717] clocksource/drivers/ingenic: Fix section mismatch Date: Mon, 28 Dec 2020 13:44:45 +0100 Message-Id: <20201228125034.780980192@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Lezcano [ Upstream commit 5bd7cb29eceb52e4b108917786fdbf2a2c2048ef ] The function ingenic_tcu_get_clock() is annotated for the __init section but it is actually called from the online cpu callback. That will lead to a crash if a CPU is hotplugged after boot time. Remove the __init annotation for the ingenic_tcu_get_clock() function. Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT) Reported-by: kernel test robot Signed-off-by: Daniel Lezcano Reviewed-by: Paul Cercueil Tested-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20201125102346.1816310-1-daniel.lezcano@linaro.org Signed-off-by: Sasha Levin --- drivers/clocksource/ingenic-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/ingenic-timer.c b/drivers/clocksource/ingenic-timer.c index 58fd9189fab7f..905fd6b163a81 100644 --- a/drivers/clocksource/ingenic-timer.c +++ b/drivers/clocksource/ingenic-timer.c @@ -127,7 +127,7 @@ static irqreturn_t ingenic_tcu_cevt_cb(int irq, void *dev_id) return IRQ_HANDLED; } -static struct clk * __init ingenic_tcu_get_clock(struct device_node *np, int id) +static struct clk *ingenic_tcu_get_clock(struct device_node *np, int id) { struct of_phandle_args args; -- 2.27.0