Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1411903pxf; Fri, 19 Mar 2021 06:47:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkZ9gbbduqjKnG0qp0c3QGRDFojaXb/05LwOX+6r6ZV6GOuRUkaKVAJy5tUVQXU+OXJnkq X-Received: by 2002:a05:6402:1cc1:: with SMTP id ds1mr9458477edb.135.1616161663911; Fri, 19 Mar 2021 06:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616161663; cv=none; d=google.com; s=arc-20160816; b=Y5D6py2aoldY4Ba7HjMYZ1gcoHqxvBLbvGTImTVm2xHirE+XA3L/vB8fTCUFHKIVh1 bkZTHKy+JRM/091v5Fs9KteZ4aVe83ZgQeG2p33ALpIBFPmbjYVAOWeIHPGS3KDHBmhC k3i1CeXEjINtI3IiFE1UKVxZx4rRLtOVZ+9VvA/T0tPFlH1wBEIrZ/xdcWT/YmBjkJra ZbcE7CU7jlHVnpCCdvaiaNsfTztG71HByqjeZS6nQ/i9fHnHn28jPoVwJ1FkO0fraRo6 g8vvAH4g3JHz76FMmMuXMUtU232a8e4md/m0Sl5VbkoIQkIwlKazXoOj/ZUNu8SGcScR tWJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=5ZzDN7D8RGi6ZW/yyDxL9t3qkp73cKM3VEN+oqEJhWs=; b=HTDpSr7EYK9WJHMYQ+lh3Nrluzg1ft1WRIVVFEvO8/8wUKnkb3sM2F/e0sH5j9uAJ0 O5FFU34IpbiuwLmBKjNvpgsWDwDcdn2ImkxOgxtlvbZ7u1Ne9gaLD5aDuO7rDVh3gb2t LJeAhHrsvaiQAkez1NhUzc3onG3/oU9CMn9sx9scIhrTMWKpgjpt21E5E3TSGyIwUpan WiWMh/QjvZgAgnYTX0RtryYCiHvxEu0diaQdiPD6hYb9oMMmImCbBwlZOdXnrzPdmpKj fJKcBdmlegiCEDRpEQ2QFm1Oz0et2AVNhaDEu7kK+z4BYuf3AB4merKsNNF7qzw4plUp +CmQ== ARC-Authentication-Results: i=1; mx.google.com; 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 n3si4263919edo.368.2021.03.19.06.47.21; Fri, 19 Mar 2021 06:47:43 -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; 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 S230039AbhCSNoM (ORCPT + 99 others); Fri, 19 Mar 2021 09:44:12 -0400 Received: from mail-oi1-f172.google.com ([209.85.167.172]:46735 "EHLO mail-oi1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbhCSNn5 (ORCPT ); Fri, 19 Mar 2021 09:43:57 -0400 Received: by mail-oi1-f172.google.com with SMTP id m13so4798248oiw.13; Fri, 19 Mar 2021 06:43:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5ZzDN7D8RGi6ZW/yyDxL9t3qkp73cKM3VEN+oqEJhWs=; b=B5r4T+p6cmbKqsHrtGZ3MtMnMC2RtPe6EHk8kcJC3Uffn892M9T5S0qNXqdtzR21XW qgPNJSwZEztAzQv5NyLBLCw1Xbk5UGcuH8m5KAcAYXE+jpS2+qz3gRv6R+cC3JukRZNJ bFzkiOMQRibUeK9DPDiiLZTFlHNSuI8bbS20/YQVU/TRX2aUfMf4Q1Ba0TfJRCbygcMY FAZIJGZ8TfxoHsuIZcG77z8hlir96BZ0uMVCiymB9h8EkPdGUzJSS576Kgi3r1htr1lW /6TAwFiTDa4VmieLV0UckZl3H9rvuolOv7n4A5G1l/hLjNLE4FJDGPn0I767LmgJfRRr bV7w== X-Gm-Message-State: AOAM533kQi9oOOye9ud7UHjYJqy0s3XLDl4MZ9xoKx+K6V1Jc1bRAtc1 mznBnue+xUmjUtevOwGe5h+XqzMN18v6VSyVujc= X-Received: by 2002:aca:c4c5:: with SMTP id u188mr1079430oif.71.1616161437306; Fri, 19 Mar 2021 06:43:57 -0700 (PDT) MIME-Version: 1.0 References: <5448054.DvuYhMxLoT@kreacher> <4304785.LvFx2qVVIh@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 19 Mar 2021 14:43:42 +0100 Message-ID: Subject: Re: [PATCH v1 1/2] Revert "PM: runtime: Update device status before letting suppliers suspend" To: Ulf Hansson Cc: "Rafael J. Wysocki" , Linux PM , "elaine.zhang" , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 19, 2021 at 2:31 PM Ulf Hansson wrote: > > On Thu, 18 Mar 2021 at 19:15, Rafael J. Wysocki wrote: > > > > From: "Rafael J. Wysocki" > > > > Revert commit 44cc89f76464 ("PM: runtime: Update device status > > before letting suppliers suspend") that introduced a race condition > > into __rpm_callback() which allowed a concurrent rpm_resume() to > > run and resume the device prematurely after its status had been > > changed to RPM_SUSPENDED by __rpm_callback(). > > Huh, the code path is not entirely easy to follow. :-) > > Did you find this by code inspection or did you get an error report? There was a bug report that caused me to look at the code once again. > > Fixes: 44cc89f76464 ("PM: runtime: Update device status before letting suppliers suspend") > > Link: https://lore.kernel.org/linux-pm/24dfb6fc-5d54-6ee2-9195-26428b7ecf8a@intel.com/ > > Reported by: Adrian Hunter > > Cc: 4.10+ # 4.10+ > > Signed-off-by: Rafael J. Wysocki > > Reviewed-by: Ulf Hansson Thanks!