Received: by 10.213.65.16 with SMTP id m16csp68527imf; Sun, 11 Mar 2018 15:52:29 -0700 (PDT) X-Google-Smtp-Source: AG47ELtDFPjS8mJh/n23Ylwpp8VQ5XujnmuPBYurbpc5CcEYST2N5j7MRW02Paf+8vLcSFk7KwPD X-Received: by 10.98.70.89 with SMTP id t86mr5905998pfa.215.1520808749737; Sun, 11 Mar 2018 15:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520808749; cv=none; d=google.com; s=arc-20160816; b=a3KQBPLOFOR14wU36Sh7jX8cCuYR3nfl+7OIKW9BUCywVpgWm8ZgUqOW+dNNBN2E7L /0jpStYVwb1lv+GMBTnJgZUFhVl2GbvB4e7XuFSq6yqunluiQfFkzXgeTFiNNo3+1G78 7P2X2td5R8wS5QM/ewyTXQeD5vFh/9cyauJ6vjHgQfy/cS8ytlzel5d/DeXk8nJG1DHE SOYrxmOAQXT/CRlKS0sxh5pYjyXep+BxaRy4RdBFXyKxuWBSzubbKr0QFEWHuiKghH+D 4lA63Cyb5f82ayA7KHJ89S97q7fGF2ol7d+SgGebnysblFTncbp3VxVgvD7fxpX57FJ+ BOwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=zJ28zOYfFHaqrdQFuDh7KB1kcBYs/P6EkyjtcLVi7Yo=; b=bR4+A75eEOQ5XOhDhwaxbPnLLoJaA3Jw4if/cELTG4zKv2vfUR8g39CvvmQngtUHyD qtI0sTExeqbVNQVD8dfSjj1Hv/l/SjNq/th7wZDtA/RVr4srts8iJNEDN/F2iPXyxV23 YPyUm7bsYFXOQVQzMZovH2iDyZvIKByB9MSJP9R2fxNJRNS3o5E3smheh8SXLdRObdN5 Yld2nFHo5TYta1U9YrbSg5oy5UVtucffuWGeehKD/DAaRfUedVfD2z/RqrgpJLTjCKk8 00pLYyVY2bXoXPBANs46zjakWP1yTXHR3yvXk9bMKodKrlzIiQNU79dOmzbalQoAykVo mBDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TvoVZQy1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j125si4156055pgc.697.2018.03.11.15.52.14; Sun, 11 Mar 2018 15:52:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TvoVZQy1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932390AbeCKWvW (ORCPT + 99 others); Sun, 11 Mar 2018 18:51:22 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:39130 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932290AbeCKWvU (ORCPT ); Sun, 11 Mar 2018 18:51:20 -0400 Received: by mail-wm0-f66.google.com with SMTP id i3so12707282wmi.4; Sun, 11 Mar 2018 15:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zJ28zOYfFHaqrdQFuDh7KB1kcBYs/P6EkyjtcLVi7Yo=; b=TvoVZQy17gLZK4jvdcFbUC0vTk0hVdd1H/Qg+4Qiz2ptzanfQpQt2N0OaEOdiN7RIN xvLF0EQwoB/4oZf/wSlqI2dhlaA+2A9KLqc0jlJf1E/ca6SsdwyIUfbJm3/yWVMT+FDl jCIFKCEzcLr9OAnaz6CCEbb275DNsS065TEgA5snENs9YtBRgQwtW9ABq8guf3P7A0dF /TJrOD37R5t6atdia8p1Y4ZWFWkCDRVB8xBSpBcm2tMtJECub7JzvAnn7sG9HHoU+2UU FqakkaHSdmx9RAuqHHtMsjigDrpI2uzi4fzviOIxjf+k33yyglxrUgu1obN7ZB71N0Gv IDBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zJ28zOYfFHaqrdQFuDh7KB1kcBYs/P6EkyjtcLVi7Yo=; b=AkIP6tzTxcVi1nUS7xJRoUdAKK1jvsKzhcyogzcLfo6wy9M9DB0ism36pGyQ5zJZad ZVieVC0U39yrdd+AAli0ZtVkONcJIPnzAbn2HPJ/ZHXWg5/FaXiOEaLA35jWuZTQ1pKq JAAoUinUz+oNY8oFtT3RNWOz52urmjLg/UPs3doc5nfn1YT2B1ve6EZrnBcHIT+vSc38 75t817vv1qkCP8wmfj4oY3uKkUECdcBqDIDcXpVdqphhOAai/yuUhMohw9vy92dW400x xsIJwpBY8PWeTkdlVajitREIoKrHp4SGfo+6X+k4GgykIreHiT6N8bkJu5XHpxYhDiza LjSw== X-Gm-Message-State: AElRT7F4vQL7W7BN6F42F2D2yuGl6Q3QT3MydqIidlNZZGEUshg2Aczc V9YM5q+ZsyWhg2PWAFwMe/UCupy5 X-Received: by 10.28.213.129 with SMTP id m123mr3770714wmg.148.1520808678856; Sun, 11 Mar 2018 15:51:18 -0700 (PDT) Received: from ziggy.stardust ([93.176.145.166]) by smtp.gmail.com with ESMTPSA id u62sm5042284wma.15.2018.03.11.15.51.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Mar 2018 15:51:18 -0700 (PDT) Subject: Re: [PATCH] soc: mediatek: fix the mistaken pointer accessed when subdomains are added To: sean.wang@mediatek.com, rjw@rjwysocki.net, khilman@baylibre.com Cc: ulf.hansson@linaro.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <9d9d75250bf62b491294a0c550c35ab7aba05eef.1518113047.git.sean.wang@mediatek.com> From: Matthias Brugger Message-ID: Date: Sun, 11 Mar 2018 23:51:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <9d9d75250bf62b491294a0c550c35ab7aba05eef.1518113047.git.sean.wang@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/08/2018 07:07 PM, sean.wang@mediatek.com wrote: > From: Sean Wang > > Fix the pointer to struct scp_subdomian not being moved forward > when each sub-domain is expected to be iteratively added through > pm_genpd_add_subdomain call. > > Cc: stable@vger.kernel.org > Fixes: 53fddb1a66dd ("soc: mediatek: reduce code duplication of scpsys_probe across all SoCs") > Reported-by: Weiyi Lu > Signed-off-by: Sean Wang Pushed now to v4.16-next/soc Thanks a lot @stable this would need to be applied since v4.13 > --- > drivers/soc/mediatek/mtk-scpsys.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c > index fc55faa..9de801e 100644 > --- a/drivers/soc/mediatek/mtk-scpsys.c > +++ b/drivers/soc/mediatek/mtk-scpsys.c > @@ -1048,7 +1048,7 @@ static int scpsys_probe(struct platform_device *pdev) > > pd_data = &scp->pd_data; > > - for (i = 0, sd = soc->subdomains ; i < soc->num_subdomains ; i++) { > + for (i = 0, sd = soc->subdomains; i < soc->num_subdomains; i++, sd++) { > ret = pm_genpd_add_subdomain(pd_data->domains[sd->origin], > pd_data->domains[sd->subdomain]); > if (ret && IS_ENABLED(CONFIG_PM)) >