Received: by 10.192.165.148 with SMTP id m20csp1248938imm; Thu, 10 May 2018 07:52:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZofjBknGtOzPC0vYz3vIIPkBBabZ2mnfEdj7JJIUE/4a464LzbIPg0nB+Iu0oxEvb/OcvEp X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr1726325plb.198.1525963943465; Thu, 10 May 2018 07:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525963943; cv=none; d=google.com; s=arc-20160816; b=duCjjlRRhQoBZchqoKtGr+tl9R+EIJiemVhm9RJyKEzZh3mIuszZ6pPIcwTHSDAbY2 XvIScPAjmvfdhen0yvhRWPdak4SVOGRSdbgYTWEGh4kjUWu3frYCIW51gnrMkevdjmWX 0NlSLbAKLBbRECzWo1NrZuckOYwvDCkuDSMg4UFSAeYb5ULg/DyIQMnhqQxnnSR3z6yX LtUf2t9sR0PGsbqVXRVHCre9E7WAPEGKHVroyLByO2DV+A+FGupJuXND0/RLN8Gn9PO7 r5tCe7hgs+fGwSfZzqm8BCCdEhRtp9824r/V5T8sz+p7PTPA5mLDQPrHDWbzE7claYTE uM1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=8+IyYOUGT49t95lmE+Zp/mi8CUvd1Piiaww20tJYdKQ=; b=Bn42cj2zrMfFYoXK0cGMIavo7DJIeH9/Gt4IlZoKVKeHriPR5I/Q8ckCdsrIFnBk0S BH3TKB0AXuXcmYEfImFuc99B54T1JYNeWNLaUjBWk0QfVjB/pYNgo79dAHAlORbw9IFY QHyRnTIj7vKJqhtg3S8IIuuqg/gKP4N5bDdqVEp5XeTU98RDc9ZTplpZO1yf4LosA01Q ui9VkuGMzRuDPzgn+1czF+RCA/6c3Bc94rWB9SWdARRn2FggQ5v+VjcfHb3VCISt597e /fNGJWr5pFYZv8FixGk9YNoNNUbttnRr4MrMBFErojxp0HADx+WnH+z54UTPvgo5U1pb Csyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ZH0zjoNn; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1-v6si772937pge.538.2018.05.10.07.52.08; Thu, 10 May 2018 07:52:23 -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=fail header.i=@gmail.com header.s=20161025 header.b=ZH0zjoNn; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965283AbeEJOtl (ORCPT + 99 others); Thu, 10 May 2018 10:49:41 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:40972 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934430AbeEJOtj (ORCPT ); Thu, 10 May 2018 10:49:39 -0400 Received: by mail-oi0-f66.google.com with SMTP id 11-v6so1979459ois.8; Thu, 10 May 2018 07:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8+IyYOUGT49t95lmE+Zp/mi8CUvd1Piiaww20tJYdKQ=; b=ZH0zjoNn7x6Inl6kzaAFEq1jIYoRSYVGrnFjlPRkMHx5DL3/d7ZJa1nrXzSfvGAeqG uSRZYq9OieM6KuRiXq17pXdqj71HuoKtm79ROi5VB+bk9D68YPPHZooutwOK3pY+zGLf A9tkcqZJ86hK2phEuF36pqTN3pMrCeSDCTdFXS6J4kQa4K6/KFSQrF3cUH1zOkJ6aM03 mWBkf8EjkjYpQvzf6hQd/qrX/J6NzW3SoZBjk842P215AlSbnU0lmOgC3u7bTf8fyjf3 vb4cDXB/kvzw9q0hegknkOo5z+O47P2WQsL7fm9e9EqVEdV7R4I7bZzu8GkUBqPtbp5n RgpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8+IyYOUGT49t95lmE+Zp/mi8CUvd1Piiaww20tJYdKQ=; b=r6Xao35pK6pua1M3RTu8vCL4t5E/t3+SM0vLcUIFJxUNeMcMtx23+ZLfVL/kefuA2u /I8/H2he1Xm+SDPu0rNDEs8CV9elUrPskEnVwmCbTpAViFgqPMi+CbH4JX2IUS2PBHMS 5OMQ5DZ3rPsH2XNjVn+wwxKc2I/a/ss16vYVhaoa2YklQCIXccnD9pazIa2D1I5VjXLV 6Wh2Ig9eIWQmjxmpKT0dcjxHEs3llC/Rn5SQVCaYhVLb9HTw7R07YRgIcRLcyfk0SO9T iZHMtyCiIuR2x+l58I+r6+SbbYKr0c0yvcUvIvvnfBGVam9yS5OwmI2aZSG3DVWjHKGM E2cA== X-Gm-Message-State: ALKqPwdR7MWGbkMhOaMM3PkVU2QxUota8EVXH6la7TPckfpVqzaLp18j nf3oEv91esGJpAnBeJC4cgZZmM6KgdRbGJTOqN0= X-Received: by 2002:aca:1107:: with SMTP id 7-v6mr1019259oir.116.1525963778961; Thu, 10 May 2018 07:49:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:1468:0:0:0:0:0 with HTTP; Thu, 10 May 2018 07:49:38 -0700 (PDT) In-Reply-To: <20180510130343.GA173327@bhelgaas-glaptop.roam.corp.google.com> References: <56a8953c-d833-837c-57d5-fe758d4db02a@canonical.com> <1823373.ea0yBGqyI6@aspire.rjw.lan> <20180510130343.GA173327@bhelgaas-glaptop.roam.corp.google.com> From: "Rafael J. Wysocki" Date: Thu, 10 May 2018 16:49:38 +0200 X-Google-Sender-Auth: ifhRPB24uxi4-WQ4HfFhql8JA74 Message-ID: Subject: Re: [PATCH] PCI / PM: Check device_may_wakeup() in pci_enable_wake() To: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Joseph Salisbury , Bjorn Helgaas , ACPI Devel Maling List , Linux PCI , "linux-kernel@vger.kernel.org" , 1745646@bugs.launchpad.net, Mika Westerberg Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 10, 2018 at 3:03 PM, Bjorn Helgaas wrote: > On Wed, May 09, 2018 at 12:18:32AM +0200, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> Commit 0847684cfc5f0 (PCI / PM: Simplify device wakeup settings code) >> went too far and dropped the device_may_wakeup() check from >> pci_enable_wake() which causes wakeup to be enabled during system >> suspend, hibernation or shutdown for some PCI devices that are not >> allowed by user space to wake up the system from sleep (or power off). >> >> As a result of this excessive power is drawn by some of the affected >> systems while in sleep states or off. >> >> Restore the device_may_wakeup() check in pci_enable_wake(), but make >> sure that the PCI bus type's runtime suspend callback will not call >> device_may_wakeup() which is about system wakeup from sleep and not >> about device wakeup from runtime suspend. >> >> Fixes: 0847684cfc5f0 (PCI / PM: Simplify device wakeup settings code) >> Reported-by: Joseph Salisbury >> Signed-off-by: Rafael J. Wysocki > > Acked-by: Bjorn Helgaas > > 0847684cfc5f0 appeared in v4.13, which raises the question of whether > this problem is important enough for a stable backport. Up to you :) Yes, it is IMO, thank you!