Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9251862pxu; Mon, 28 Dec 2020 10:28:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyBw3vaF++1oRTgcMoe4+/JHuTE/P2inOAkPsJepdjaAbXUm6CCsDr41YRQwVF02gh4PbT X-Received: by 2002:a05:6402:1597:: with SMTP id c23mr43754576edv.212.1609180121793; Mon, 28 Dec 2020 10:28:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609180121; cv=none; d=google.com; s=arc-20160816; b=F0D9YlVLVOcxRBtJSItNjLFz8/T01b97FvF7jP3vyuk9L4kvEOab1/CabSZ3ajRIVU AOKfoGCjB1SouznU5hBxbDDR4xirhmyivGYISxJgdRqKzmzakMVnu3jquxshLAVCOFZ3 mfOGJdtDy7rQvGLDvOIFmBnGmanKbvIyuX8zKYS9AqI1NA/pMXDHF2oD+vkv4rkax0Em yZKvlie0/A3uYxT3sqG8dJhkjYOjlh51JxtnlvivvOCWvnRp5G+IWlpyfXepIFq4OU2P zfgU/2hcgso4vgKIji27voubCOKkcjSL64/C7nQsdfRi0hk2BW8HzULpLg+IGoHsxk3D hrPg== 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=X0UAr4LHHuyngdAVd0nSwDIoXg2j+x0O7oiH+RdYq58=; b=DB5v39xLjyiStpi6C2DpGbsJ2hp6yLLmpTIyY6dk9N3kXqs1MSZsYXj67KLdxjhgG2 bpb58cHtdVHT09M5SqeoFaSSi4Ep3a+q3G6G95oPKuotBso66Wj2YdE8dedQTPtSDbDd Q7yqnpYbNHZtsF5NTTTjbyiWU+u7El37ysaprqOBoGEZk6xjKbhmkmHcIp7MWinD+fC0 LN+1JwENUgZgj+n7SLZivsdvR29/OkWkyscvASK5xCLli3cw3YgqmxFORZXvV07nHCCX 4RC6DHe3VzkQXj/8oXWzs6XnbZfXRFZ8omHMpCQCAc+7wVYvwnLpuMz5pCRACsr2c6TG Uc6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vB5PKAGq; 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 n5si21847517eda.301.2020.12.28.10.28.19; Mon, 28 Dec 2020 10:28:41 -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=vB5PKAGq; 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 S2387763AbgL1Nca (ORCPT + 99 others); Mon, 28 Dec 2020 08:32:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:33020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387725AbgL1NcZ (ORCPT ); Mon, 28 Dec 2020 08:32:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F0E3C22B37; Mon, 28 Dec 2020 13:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609162304; bh=pxTx6PyFtjISTgUey0+sl+YVLAPFdJ+nASxXyKqrlXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vB5PKAGqb/UHHQfTFc3L5VCsb6h10ZBD9EgrKkiU7j5055K08BByvQk1YJq8YXroP XTpUCm/BbKHhHMVYX3SiAVd7WxhdCifuDfEEHNZM+fSVxsJsj/1cuVgkixgWclkiaf vx+VBo8dLHD/e0lFCBViocgTe2a+HO5zajo3R8Q0= 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.19 250/346] clk: sunxi-ng: Make sure divider tables have sentinel Date: Mon, 28 Dec 2020 13:49:29 +0100 Message-Id: <20201228124931.867424482@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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 9ac6c299e0744..19304d6b2c05d 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 61e3ba12773ea..d9789378caf55 100644 --- a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c +++ b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c @@ -328,6 +328,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