Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3868251pxu; Tue, 20 Oct 2020 02:35:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoiKD4Ba21GGLNh/VGUp3iKbk825vR+zSEta43Mm3J9iVO9FO/HWeWXbpEPG+IHk8Twb2I X-Received: by 2002:aa7:c54f:: with SMTP id s15mr1887510edr.107.1603186556205; Tue, 20 Oct 2020 02:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603186556; cv=none; d=google.com; s=arc-20160816; b=EqcehPGk6zranU+yRwuC71Qhua8EcG2hksBYfMZ9j3qwmFKeb+j4Gk8IWezuTGEY55 IiaG16Od2Sb0Va9BOCZ/RaE1+Tntj6zPgKpea0b6jpp2wioT2LKJwKPHNGpNvZoNLIBg AkC6IoNOB9HcDsbuQPBg/L3W7bisldbgH09JahQxt7IFkR0XhG//teXXnGTtoLWYGlmQ CDwbhV4fTaTlWLh2zHrTkEiUvsIVbu7T9OHOLDuB3DcdXWj42X8NMF7583v+YkWWeOoa eOzaWYpO/h2XudwGnrU2ZGObPOEVufZVUq+RAddYqqKX4L80XnTz/Kt1/92ItA95Wndg 7XUA== 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=sVgRRaBpYwQgsaxArL4/Xd3hWfIqD1r6litlTgU371s=; b=MJlhb2be6+u5jNUGKw5YIBb4OACSpySwMzafO9i5xFhbQJGsVKsplNGj9KZz/EcgHH /vGHraAHgqTwJHLBfySzKXRprPMkf6+gxABkS4QPkxO8MOtKhtnXnxfvV67zwNSVBXGK u2FO6Z0PuYiiyT2HCYzDbA32t4SJHwNblEdVKGO6Lv5n5t/5V841PI39Amn8vhrQa2IL hrdX8et23AN40Ub46481jevb89Oitg1e0UtpZi2TiabJI24Dxf6kb9pF7Ol8/d5rG3ei LIK464YDaCfWZjZtyPa3yk9f1WkSoVozZNAE50UADqSyhZcoQFGR9cAe0XQ/Nww3qgk/ IAkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Aayejnll; 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=fail (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 x18si725683edl.321.2020.10.20.02.35.34; Tue, 20 Oct 2020 02:35:56 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Aayejnll; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391792AbgJTF44 (ORCPT + 99 others); Tue, 20 Oct 2020 01:56:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:50924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730488AbgJTF44 (ORCPT ); Tue, 20 Oct 2020 01:56:56 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0A76A222E8; Tue, 20 Oct 2020 05:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603173415; bh=oAtXafPoBCZJ2xzyrzOvNh0P6arfz924fKvmhGsZWz4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Aayejnllq8c9q2gjAgypAxdNbyI6HOZf7i+SoOfDAyQsrGPempusOZQ0IdPPZKl9C RLneft26fGYKxtgsdRjfecFZhOBvqF3KZXogLYxLUwht20n759bsWdCWpy5kh5/7cf 1NLEF9Ury88msYIavO5wsPCVaMT6AKdXyYBsbOeA= Date: Tue, 20 Oct 2020 07:57:38 +0200 From: Greg Kroah-Hartman To: Abhishek Pandit-Subedi Cc: rafael.j.wysocki@intel.com, swboyd@chromium.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, "Rafael J. Wysocki" Subject: Re: [PATCH 1/1] kobject: Don't emit change events if not in sysfs Message-ID: <20201020055738.GD3437534@kroah.com> References: <20201019223257.261223-1-abhishekpandit@chromium.org> <20201019153232.1.I797f9874972a07fc381fe586b6748ce71c7b1fda@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201019153232.1.I797f9874972a07fc381fe586b6748ce71c7b1fda@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 19, 2020 at 03:32:57PM -0700, Abhishek Pandit-Subedi wrote: > Add a check to make sure the kobj is created and in sysfs before sending > a change event notification. Otherwise, udev rules that depend on the > change notification may find that the path that changed doesn't actually > exist. Why is the user of the kobject trying to emit a uevent before it is registered? Shouldn't we fix the root problem here instead? Otherwise the event is still "gone", the caller will not know what to do about it. Please fix the root problem here. thanks, greg k-h