Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp238099pxb; Fri, 15 Oct 2021 04:40:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1BURWH6AXIkwvevw2QmvUwgjTTiz0p/JmRS+kJTqLramAb2dNsKIzfOAkPKYb8E6Z+Wzc X-Received: by 2002:a05:6a00:24d6:b0:44c:df15:f52e with SMTP id d22-20020a056a0024d600b0044cdf15f52emr11325514pfv.36.1634298045742; Fri, 15 Oct 2021 04:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634298045; cv=none; d=google.com; s=arc-20160816; b=wzzM1M3UPaAG23s78Paexiic3L3BvsD7gP5E9JZmZxsJu4quXmOnZ8a6CZGiHUVYD4 E14AYcRs+pJjGe3ZuMZlzNZmcfEK0UKKviQZ6uQaohYxLzlBw60nbfPnrRnRl0Swy9Cx /jITFMdeabyKzYEKZKoV7ebbNXzpmBK9Ydz/vmZ7tTCEALPaFa0h+AhenXYyV52Hie93 Eq0srYTTwjcX+23reMcBp1WCTC8FXvVkBpeUzf62PFXbPxhZ07wWwxip00iwfbgI9oEs rRcdmkjZaUnvrESf8whIbjGz4/f0XivIVh/Fl94LSpNFNy1Q2y97La9NjwIawA6jpvgF 6vww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=BIue+/lO+QnuExhgX4n2r4mpz/nkRtU5iLdQl7BycdY=; b=eJrL6caCmAAbNeM00vjACX855BGG4mr8DkYlm3PM5JiqUOPv+CHxfWzd1oh5zKNH0B yuW5fgw3XNzYCcH4GV7qWuHKSg6Xm2iOXusbmsmAG+WNhCPkVZ+aS5teYfDj1YgZo6mA qGqaFBdjT+Z+VIokn3YjyPGk36sgbJ0Zub03mcWdMutwanaUT+f9aFP6Fa7nAbkU0ZWK 48Q6N7BUCJT3IGwd5yuAl0pJE37fl8X0Y23aTGP+cG+s/nz9TmH0umbqfNYGUOs1v2HR oySgkKSRtlmNTrpkOaGrfDM85zFpmEhmxeRvnKkcJA35/qZkRvdJibOf/pit2fW/sMhP bGRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YfAcv55P; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si7153232pjy.50.2021.10.15.04.40.30; Fri, 15 Oct 2021 04:40:45 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=YfAcv55P; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232591AbhJODMf (ORCPT + 99 others); Thu, 14 Oct 2021 23:12:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:44218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbhJODMe (ORCPT ); Thu, 14 Oct 2021 23:12:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 18555611CC; Fri, 15 Oct 2021 03:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634267428; bh=kXgOJ8sBfwFLadg5Fg+80nI5My/aKal1KpkR8dG4Ymg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YfAcv55P3FDIh7z2OYlmAembI3fq9+KxD9DP8ju1N7cBDAdypgBhThZPqZppbyFir Ci/MIwB8SjZ8HPUHbtsMzHJlZYhk9Y+w0mHK0xkLDh/rFVJDM0eqtvzzXS4PcMX4vL NwntbMR7L6Kh/k1j5LqsnKC6xEQRR1rzqwTsw7/8uZ8ZzWPiB3TIsXcbCxqI5a6lAD 2AxhgwJ4Qt//l502YLBiimSehKPcXejNOGMfNlH0EDDAfJ/ER7V/kcsWPB/LeFiXFO RIowAzjCzxaVJQdQJ+jkFdoKkAFQod+kRgCMrcfgUrvFwIi0n9bh2XaLM0Ovci/ji3 WKLtR61bv6wSQ== Date: Fri, 15 Oct 2021 11:10:22 +0800 From: Shawn Guo To: Dan Carpenter Cc: Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Lucas Stach , Peng Fan , Philipp Zabel , Frieder Schrempf , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] soc: imx: imx8m-blk-ctrl: off by one in imx8m_blk_ctrl_xlate() Message-ID: <20211015031021.GC22881@dragon> References: <20211011123638.GB15188@kili> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211011123638.GB15188@kili> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 11, 2021 at 03:36:38PM +0300, Dan Carpenter wrote: > The > comparison should be >= to prevent reading one element beyond the > end of the array. The onecell_data->domains[] array is allocated in > imx8m_blk_ctrl_probe() and it has "onecell_data->num_domains" elements. > > Fixes: 5b340e7813d4 ("soc: imx: add i.MX8M blk-ctrl driver") > Signed-off-by: Dan Carpenter Applied, thanks!