Received: by 10.223.185.116 with SMTP id b49csp1023780wrg; Wed, 21 Feb 2018 10:44:55 -0800 (PST) X-Google-Smtp-Source: AH8x2266c2p7rkFZ3Sf585WY1+W73zZPZk7+bU75khDB07xRYTe/c6q0ohT8uwQ1/JCtlLOenkbj X-Received: by 10.98.61.73 with SMTP id k70mr1222840pfa.10.1519238695756; Wed, 21 Feb 2018 10:44:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238695; cv=none; d=google.com; s=arc-20160816; b=CSZ0zlsxF0AuK035XR3MxPbPckbptKT/w0hE6R6PcxYO/fyWXo+3iuhTNbSnKCVSOc 2KlFemxhv2UI1F2vgrGRVNh/Ot2tcKSzY2aMHTDQE0vvbLtkK9S64VbIdS5a+AVAK2qH Wy3ZRRuxBLDHg0eehnN82DgEVNY/WQTjZShzO0mSWNgQP+BZLha24F092s/pko58vJba OlhegOfNMy2lhslWhRnGMxZ+jx06k0tkUq3zhMehOWW3vKqaipBAY/mB0FhVujONe18H XPP3gHC8tDsfTJ59o1y28Brc1EUJjmOyRsUliWSnQaMjVuovFy29+TwnYpCpnc7CTWkW VL7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=SU/2h955TC+7S1FOZbyN0vK1DF160usbuqhFkBKa2Ec=; b=eDQajx/qJzTaVkvgbpRMsGz8pjQR52AR1/MizCNHi7lxsSjX0tEu5fvK46GTknABrv 39MRDMRbufJFZ9JibLeG1Ja9mlPlhTnROgn7bewpOamPA/3APwg3gaGh9c42FfowPtM1 RSsealN3qPyDCeH/GFCZmPh4m6Sx3LA0gQuZrSBDWDHKisU4zKyFp+PXOaZIG4B4LWg/ jKyzfgR38KuzFcACUNdPxBpA1tVaP1YCV1lO8QZ22b9DcARMnpq6ic+Xj4mZqBh5OBpH 21zU7XhBvLyyWlTl1ABm3pn4Olv1bPaRVyJTqSB6x6MfqHLNBbub9JdhMN8PHsOUchdl Izjw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si160380pgu.560.2018.02.21.10.44.41; Wed, 21 Feb 2018 10:44:55 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936028AbeBUNcl (ORCPT + 99 others); Wed, 21 Feb 2018 08:32:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43500 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932830AbeBUNKN (ORCPT ); Wed, 21 Feb 2018 08:10:13 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3D0C8121C; Wed, 21 Feb 2018 13:10:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Wunner , "Rafael J. Wysocki" Subject: [PATCH 4.15 055/163] PM / runtime: Update links_count also if !CONFIG_SRCU Date: Wed, 21 Feb 2018 13:48:04 +0100 Message-Id: <20180221124533.499794527@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lukas Wunner commit 433986c2c265d106d6a8e88006e0131fefc92b7b upstream. Commit baa8809f6097 (PM / runtime: Optimize the use of device links) added an invocation of pm_runtime_drop_link() to __device_link_del(). However there are two variants of that function, one for CONFIG_SRCU and another for !CONFIG_SRCU, and the commit only modified the former. Fixes: baa8809f6097 (PM / runtime: Optimize the use of device links) Cc: v4.10+ # v4.10+ Signed-off-by: Lukas Wunner Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/base/core.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -313,6 +313,9 @@ static void __device_link_del(struct dev dev_info(link->consumer, "Dropping the link to %s\n", dev_name(link->supplier)); + if (link->flags & DL_FLAG_PM_RUNTIME) + pm_runtime_drop_link(link->consumer); + list_del(&link->s_node); list_del(&link->c_node); device_link_free(link);