From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60FB0C433DB for ; Tue, 19 Jan 2021 15:23:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30ED022D2A for ; Tue, 19 Jan 2021 15:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390723AbhASPX0 (ORCPT ); Tue, 19 Jan 2021 10:23:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:50828 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391286AbhASPWV (ORCPT ); Tue, 19 Jan 2021 10:22:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A0A3E23110; Tue, 19 Jan 2021 15:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611069701; bh=qk7bTIU32WQXEVpSYr8ZQ5kj+qrngrcgdHRTogxr7Dc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eoxZAwoaQ5d6ppq/JxVV+ZvPnmkXzAaC9P+yuT6raP3pPaU968h2eqioupYXq7+6e xl74BdLKtv+HGlEak8XzPTvbwxi/9J7S2EpeiwyloIpCViCIVYGst39naXNI3Vxybm MDvv8H20ZZEVUDe1FAGYKjyUuGTOrVvWf8YdTsOA= Date: Tue, 19 Jan 2021 16:21:38 +0100 From: Greg Kroah-Hartman To: "Rafael J. Wysocki" Cc: LKML , Linux PM , Stephan Gerhold , Saravana Kannan , "Rafael J. Wysocki" Subject: Re: [PATCH v2] driver core: Extend device_is_dependent() Message-ID: References: <17705994.d592GUb2YH@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Tue, Jan 19, 2021 at 04:09:14PM +0100, Rafael J. Wysocki wrote: > On Fri, Jan 15, 2021 at 7:31 PM Rafael J. Wysocki wrote: > > > > From: Rafael J. Wysocki > > > > If the device passed as the target (second argument) to > > device_is_dependent() is not completely registered (that is, it has > > been initialized, but not added yet), but the parent pointer of it > > is set, it may be missing from the list of the parent's children > > and device_for_each_child() called by device_is_dependent() cannot > > be relied on to catch that dependency. > > > > For this reason, modify device_is_dependent() to check the ancestors > > of the target device by following its parent pointer in addition to > > the device_for_each_child() walk. > > > > Fixes: 9ed9895370ae ("driver core: Functional dependencies tracking support") > > Signed-off-by: Rafael J. Wysocki > > Reported-by: Stephan Gerhold > > Tested-by: Stephan Gerhold > > Greg, are you going to pick up this one or do you want me to take care of it? > > It has been reviewed by Saravana. I'll take it, thanks. sorry for the delay. greg k-h