Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9172446pxu; Mon, 28 Dec 2020 08:22:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkRnr2Y7H/0utrumiT5u6NAiQDF4ilbaVXVFml2Mw1pgYQC97URDTrpKH/Zcr5jGD5g3n0 X-Received: by 2002:aa7:df91:: with SMTP id b17mr43685479edy.272.1609172542712; Mon, 28 Dec 2020 08:22:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172542; cv=none; d=google.com; s=arc-20160816; b=OGvoqfrxOPfSVYFCj15aQzvQ3ZyFSHp2sosgc/QtrQP4y6o+YG8pmM9CduJCVLF2N3 Fr8xhL2+HjqSmqkuA2bePH5F8PeRtJFnUkD6gximPjagGHgVu/AWuZDrxZ2kjF9KR51h iONqXaIoivGBY+EX2q3PqVw9cCwPCj0XhJ04+/bQ51TAltjgYE1jL0/pW8vkBLjBSKA6 SESUL3j85urA1w88WG8zZ0mzcLRi/8sBLyf+WdRBGU5s8jbZfXD88i39zNrqjcSwUppz rpoNScDXmsKCTcnTrq7zRF+zz6dpXf0+rL5lnFVtTavhbUi8PbwYQvw91bKReKfSZ14N YsHQ== 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=/2F0M3wW/DF5h+sC+kIvrXuDtUDQ3WXPgczykH3Cmi0=; b=Nfh/We4R+OQPglVxMuIV44R92acUl67SaiJr33bxiL0da+aKweYvm/LthuIQszx7/g ZewAa66WeNqmzpiP8iBarMjVaoHy9JklnqBg0KcKyl28QSxhZGeyhpRLM8+JgB/ZYjth q8sylzOfK7FQC0NFyaPqNTqAUt/DvI4rGJ+CsiVrbw1QjrFPEl8hVJjq4SZRBVrodyF2 sHiKn7gccXN+xG5E0qbv+oFHgcmxcS5tkoNRPJT9T7nb9VTK22MXjXwRDIiIa8ThEbF8 M0CcUuh3kiE8RZdL/Jm+xS8rR8lzMDzkNcp03FER1hLGzNtSt2l6R3re0wRzPrTEFqGh /YGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zCV+nwiZ; 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 e16si18660892ejd.747.2020.12.28.08.21.59; Mon, 28 Dec 2020 08:22:22 -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=zCV+nwiZ; 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 S2440814AbgL1QQv (ORCPT + 99 others); Mon, 28 Dec 2020 11:16:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:45934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731578AbgL1NRf (ORCPT ); Mon, 28 Dec 2020 08:17:35 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B8E03206ED; Mon, 28 Dec 2020 13:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161414; bh=w1uyj+8QB9GT5kwpX/XN0NBBS6PW0xTqQK9FkK3cUos=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zCV+nwiZOMmJxkKKA6tBcx8t5rHiGrbwrgQkOYMzEIlK+Oim5Trzp/BKc2823Cng+ wfqLeb6KNwi/4qP9/5uyZq4KNbt4rJkTjT2B3s6Ukz26/PETf+GM0xOnl6IASgDoMJ USV94qVxUd9vZkrkalnNe8c5qrQ6HSRR4xp/vHlc= 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 4.14 176/242] clk: sunxi-ng: Make sure divider tables have sentinel Date: Mon, 28 Dec 2020 13:49:41 +0100 Message-Id: <20201228124913.363353964@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 183985c8c9bab..7e3cd0bd597dc 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c @@ -381,6 +381,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 b09acda71abe9..aa44602896fac 100644 --- a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c +++ b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c @@ -315,6 +315,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