Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2843354pxb; Tue, 19 Jan 2021 07:26:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4r4xpC44nvDZuSImE5C2BlYvGWGDl0KcXHR/kz8+ZKPg6CFf37pv2su+O+IodQvyPqaYc X-Received: by 2002:aa7:cd62:: with SMTP id ca2mr3677881edb.81.1611070017216; Tue, 19 Jan 2021 07:26:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611070017; cv=none; d=google.com; s=arc-20160816; b=NcgFtkeleIyuFKhoDNv4rd1zOIodqMUphighb9TMKNc1TsIL5j5og/Mj5DlAoUB39G rkI0mIRLPFYB+yDaNaVqCtyn0NCmdxHrEIopxlwd03+xps6XyJJTjap8Azs9Kr0PdhAJ IuHPpmiXryiTHbENLo/Uv/KeUeFy/PozPQax7rTLQ/JPWX9yI8c2bF608Ouv8bNuHecN barU9m+mdWIszoiUqMS/00XdQYCPTprY+IQwutaDDBwqDFnmtRUal5tIXOIN1PqiX06Q LxB1PtL37+MGGntM3E7UpdfnwRBU4EOLx8H64zLcu/ZmGmiEtg/m+Q3WCjccIFhJJZYo i+/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ploofec+rcchtC1waqGv6XHzggzdvztSy1T+vlj6X3M=; b=NPRCJAHuZR+b8zcSg4f2kFg1Fm6h8tmlaL/V1YIrbOdJoueikSfUPm5PHnGbKQQIQD seUI3CVOTd5BNfmGwMJDnBWO4Q6yWQ3PhB40ArIeRj54b/IFS34jsKPQagxdzTJQDyRE UiGhaRMeMqFce1XJZ8YfMgsHsWr0tgfg+IVUAA5klP28K7b7elmz4VJoEB77dmRVhZmc GGp5RI/r0/eJMk6tyhhtDicG+H4+WfvQkefzFJ//xO6SdQ/WQ9nHao3zGfmJQnJFtAGT xp84xuP1ryRQHhxPyvFbLrz1+NkjLUB9NmaZXVA7feP1m13I8mJ6clIA5c/gNpMmwVa0 i2oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eoxZAwoa; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si6834798edw.54.2021.01.19.07.26.34; Tue, 19 Jan 2021 07:26:57 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=eoxZAwoa; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391082AbhASPYV (ORCPT + 99 others); Tue, 19 Jan 2021 10:24:21 -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-kernel@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