linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	rafael.j.wysocki@intel.com, swboyd@chromium.org,
	linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org,
	Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: [PATCH 0/1] kobject: Don't emit change events if not in sysfs
Date: Mon, 19 Oct 2020 15:32:56 -0700	[thread overview]
Message-ID: <20201019223257.261223-1-abhishekpandit@chromium.org> (raw)


Hi maintainers,

A little while ago, I got a bug report of a regression caused by a patch
I submitted a45aca510b73b7 (PM: sleep: core: Emit changed uevent
on wakeup_sysfs_add/remove)

https://bugzilla.kernel.org/show_bug.cgi?id=209469

It seems possible for a "change" event to be sent before the device is
added to the sysfs (so when the rule runs, it can't access the device
path that emitted it). The bug report had the following log that made me
identify this is possible:
        > Use global config file: /etc/usb_modeswitch.conf
        > Use top device dir /sys/bus/usb/devices/2-3
        > Check class of first interface ...
        >  No access to first interface. Exit

I've added a patch to fix the former problem here and confirmed via
udevadm monitor that no CHANGE requests are seen for devices before they
emit the ADD event.

Thanks
Abhishek



Abhishek Pandit-Subedi (1):
  kobject: Don't emit change events if not in sysfs

 lib/kobject_uevent.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.29.0.rc1.297.gfa9743e501-goog


             reply	other threads:[~2020-10-19 22:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 22:32 Abhishek Pandit-Subedi [this message]
2020-10-19 22:32 ` [PATCH 1/1] kobject: Don't emit change events if not in sysfs Abhishek Pandit-Subedi
2020-10-20  5:57   ` Greg Kroah-Hartman
2020-10-21  3:27     ` Abhishek Pandit-Subedi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201019223257.261223-1-abhishekpandit@chromium.org \
    --to=abhishekpandit@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).