Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9091020pxu; Mon, 28 Dec 2020 06:25:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMBQ6fFq3izDFA0EdMnGsXc5JryxOA28QCwuKXTgxvb3r3fCn1Pg1B1TdY2VPirXBZTX3Q X-Received: by 2002:a05:6402:2377:: with SMTP id a23mr41990981eda.34.1609165507499; Mon, 28 Dec 2020 06:25:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165507; cv=none; d=google.com; s=arc-20160816; b=cNdV1730UDSYahr6nINLzo/HAwcWV2bq75yyB0/MV4OIsoFUS4aNrucmLnEU28obQy zoml9lB9LzRl9G8chtobSpKyvLP9od0QlRDo+JKbxMNgf4CqodMdogKo19JEHYMVYddt rMefMChHzT4WpRMWfjp5VxwRX+W5LqOkRieAsjQqkQ/b87mzFu00p94zdMFdiH1f/LJK G0hnlLHf3ZrGolIr42JK4SQlBoiQq5qGmXoYmyIkwUVlmuwRY8IqHHR7niJYePLpOnPq aKtOknMl2CZq06OY1ogckJdL0VXKknGvfrAwqwajRNsIdo2b+Hl7WK8vLPUluCsb+Dft E0+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lbCrG/Nx4wMo9RX/Qg+Heq45/AiySy81HlaIN61RGGI=; b=UF3qExpMrjQf81fQoe6xBC43UAktKYSIW64jvUxVjta21hhDO91gOi8q2nw4fcc4Ux 7zHKdqvkCw5KCCxFzSJeWD3/S4ovmbGJqUns1P/JyGdXXrdmIxcBSc3m/RWvGN1XIIK1 jmidmWvWuCxVk9pv2Wlu1QlwZaJWKYweRQgad1d5b4a7drirzLc9O/Q2yMegepf9moeZ yjhtod5I/gIg5CuIsS//Sy8UvjzsWOE5mbGJSnJvLEuWnas1FGxVP89dUVCQmL6MXMnc N5ocehZH2PyJGpJbongY1J1uqoTlmnd/gsrNqRUYLUa5skymDdh3nHIdk/kSk22OAZSi JRSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DCyhoPgK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si18170183eja.494.2020.12.28.06.24.42; Mon, 28 Dec 2020 06:25:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DCyhoPgK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502730AbgL1OWq (ORCPT + 99 others); Mon, 28 Dec 2020 09:22:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:58090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502696AbgL1OWn (ORCPT ); Mon, 28 Dec 2020 09:22:43 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C51C522B30; Mon, 28 Dec 2020 14:22:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165347; bh=SGoB8j5yDF3J909SAHZihhflgFYzkjcmdLEJAdoZbjc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DCyhoPgKa/eApoOLnlaAOnIq8XKZcqMjqh7I77d58Xt649S6qkqPIZSdoCKwuIqKf i9JwqHhUY/DZB5Hyzoz8jxF+Mm2TorkNTJjC6glxHotjPiVonXaBqnhg0jQYWYLzN8 w6nnE2k7mfnXOoNEWZz1CdnzP1uFNVFl2X6SK0l8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jernej Skrabec , Maxime Ripard , Stephen Boyd , Sasha Levin Subject: [PATCH 5.10 498/717] clk: sunxi-ng: Make sure divider tables have sentinel Date: Mon, 28 Dec 2020 13:48:16 +0100 Message-Id: <20201228125044.826880929@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: Jernej Skrabec [ Upstream commit 48f68de00c1405351fa0e7bc44bca067c49cd0a3 ] Two clock divider tables are missing sentinel at the end. Effect of that is that clock framework reads past the last entry. Fix that with adding sentinel at the end. Issue was discovered with KASan. Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks") Fixes: c6a0637460c2 ("clk: sunxi-ng: Add A64 clocks") Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201202203817.438713-1-jernej.skrabec@siol.net Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 1 + drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c index 5f66bf8797723..149cfde817cba 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c @@ -389,6 +389,7 @@ static struct clk_div_table ths_div_table[] = { { .val = 1, .div = 2 }, { .val = 2, .div = 4 }, { .val = 3, .div = 6 }, + { /* Sentinel */ }, }; static const char * const ths_parents[] = { "osc24M" }; static struct ccu_div ths_clk = { diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c index 6b636362379ee..7e629a4493afd 100644 --- a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c +++ b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c @@ -322,6 +322,7 @@ static struct clk_div_table ths_div_table[] = { { .val = 1, .div = 2 }, { .val = 2, .div = 4 }, { .val = 3, .div = 6 }, + { /* Sentinel */ }, }; static SUNXI_CCU_DIV_TABLE_WITH_GATE(ths_clk, "ths", "osc24M", 0x074, 0, 2, ths_div_table, BIT(31), 0); -- 2.27.0