Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp116719ybz; Thu, 23 Apr 2020 19:47:57 -0700 (PDT) X-Google-Smtp-Source: APiQypIeFv8vhoOvmywFqUuC4KcXEJmp1xfHMuATn1ZqlxD/GTp1P0sMRpYkCzZQcCddlEhAfAUp X-Received: by 2002:a05:6402:4ce:: with SMTP id n14mr5870988edw.32.1587696477328; Thu, 23 Apr 2020 19:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587696477; cv=none; d=google.com; s=arc-20160816; b=KM4PPUcr4iCV28U4wA2zgAmn5lpWFJK3ReN8ps1KuTAGXQW5ik0z38VY6Isa/T0f+C gGnqDFUGuAmVdDP/aY8AIRzE/iAth8yJwddDx58SKT9+rF5vq/soXQMi81wPWG79t1km qSWQmEMpmDOCEEgoz1KRCMQ0u/0yUzmw41Gift4gxkAEIzN9zHqZwVz4aq0IrllqvTd3 LeLEoOHKVv7Cs2Cs3xrQp/zva0RD1Pk8TCcMxBj0We0VCLTqoLmkaKP0Bd1ehy6mCblT Q4bBla87av6JCT+ekloLhnp+HdT3AemZxk/zaiwa1dv+YQ+NgXlWGKgNUqXdC+MGw1cF cTMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=MNMnOVg0VvvHH7uhAzqo/TEq6LY04Ce9ZaQn59nbqNE=; b=ua4q3ciRrqoxx1iyvvBvjaJre1Id0+bu3QoeGCLT8NRgzkJLFTaq7i0tiRfIjWQZlZ mnJcKfoUdY1DDzx25t2O0HA17rXPVAmV7pKZ8vdA6cpNT9yWxmUOH5k4P+fc7Rttg8dr j/opf2nQjVl+KukA1CgGN4yKN6q07lF62/8ABAOxqivD9KlahIvqYKNu78vwmHiVNJIp MmSZhvgtQM7c/KAP0xB6uhe/X3EiiI1MdYYBBEZgfRVOolxBuEsHCYRf6+vCzjFEy8gY icjSJsw7IUDdb5RQCLxxvnRlSbxUNIgTJgvhBlgR533wJdd83nqfHP5H7PoUiTh4lvtS ld0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W9wU0S35; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si2187001edb.262.2020.04.23.19.47.33; Thu, 23 Apr 2020 19:47:57 -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=@chromium.org header.s=google header.b=W9wU0S35; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726162AbgDXCny (ORCPT + 99 others); Thu, 23 Apr 2020 22:43:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbgDXCnx (ORCPT ); Thu, 23 Apr 2020 22:43:53 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C0FFC09B044 for ; Thu, 23 Apr 2020 19:43:52 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id t4so3194026plq.12 for ; Thu, 23 Apr 2020 19:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=MNMnOVg0VvvHH7uhAzqo/TEq6LY04Ce9ZaQn59nbqNE=; b=W9wU0S35tK3hdAWzJ5sK0FfvQ4pOzhzpB+Kp5Tz2BrjguU+aR3rN67BrYxFNIHfYIo LxfgPg2tX0tcnDr8MI4wT8jl1I4AXY6BsgyC2KXSJzlctVPKZzaEdcjEV6CYKIRHJ3uB db1an0G+FO+QGZ8xUpuGYcwfGk1+x+A/CNFH0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=MNMnOVg0VvvHH7uhAzqo/TEq6LY04Ce9ZaQn59nbqNE=; b=fkrHD5ukIvChckbF/gXbiFfDVxuSIYEynU58EKjiBz6xm31tEvU6mCWsTh/00nTfp3 YKcrsAhIkknYeIbiQc6LTc2eyvtKJ3iz5H3/hHfFaU+Jg/NOnfyr4NvskRx2x8Xh35Yi DXXW4s828HeYbFKzREJTUQKRiMPbKn05+D9P5NeyeA0cA69/68Qy+84s8LTg+lQK3vdb xkkltICveC35apmYwGWAIcWDfX/nF91Le5OIp25Bbd6D0AVZLA9+iEWyob313LuLW0Ra 6Rg3oRUBb/msPsygXmltebcenkEREPvF40ulsiHQNwSW+x3EQ3Ijy0fHzUsO7gswKOBy 7Dpg== X-Gm-Message-State: AGi0PuZYjpVrzrkrAyZn4ciZdH1v5co8YGqyFYoStZ6mfSF3n1mgce7u R/+ufvI2IOcAXso8uJgPEN83jw== X-Received: by 2002:a17:902:ee06:: with SMTP id z6mr4719895plb.125.1587696232161; Thu, 23 Apr 2020 19:43:52 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id u21sm3415738pga.21.2020.04.23.19.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2020 19:43:51 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20200422145408.v4.3.I2d44fc0053d019f239527a4e5829416714b7e299@changeid> References: <20200422145408.v4.1.Ic7096b3b9b7828cdd41cd5469a6dee5eb6abf549@changeid> <20200422145408.v4.3.I2d44fc0053d019f239527a4e5829416714b7e299@changeid> Subject: Re: [PATCH v4 3/5] kernel/cpu_pm: Fix uninitted local in cpu_pm From: Stephen Boyd Cc: mka@chromium.org, mkshah@codeaurora.org, evgreen@chromium.org, Douglas Anderson , Alexios Zavras , Allison Randal , Colin Cross , Kevin Hilman , Santosh Shilimkar , Thomas Gleixner , linux-kernel@vger.kernel.org To: Andy Gross , Bjorn Andersson , Douglas Anderson , Greg Kroah-Hartman , rafael.j.wysocki@intel.com Date: Thu, 23 Apr 2020 19:43:50 -0700 Message-ID: <158769623054.135303.13351246588453753133@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Douglas Anderson (2020-04-22 14:55:01) > cpu_pm_notify() is basically a wrapper of notifier_call_chain(). > notifier_call_chain() doesn't initialize *nr_calls to 0 before it > starts incrementing it--presumably it's up to the callers to do this. >=20 > Unfortunately the callers of cpu_pm_notify() don't init *nr_calls. > This potentially means you could get too many or two few calls to > CPU_PM_ENTER_FAILED or CPU_CLUSTER_PM_ENTER_FAILED depending on the > luck of the stack. >=20 > Let's fix this. >=20 > Fixes: ab10023e0088 ("cpu_pm: Add cpu power management notifiers") > Signed-off-by: Douglas Anderson > --- Reviewed-by: Stephen Boyd