lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANA+-vBZF+KkB-ZWhjpRS=hwhk+6pM0mmUsj8gwxy0VcKjqG2Q@mail.gmail.com>
Date:   Mon, 19 Aug 2019 11:30:43 -0700
From:   Tri Vo <trong@...roid.com>
To:     Stephen Boyd <swboyd@...omium.org>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>, Qian Cai <cai@....pw>
Subject: Re: [PATCH v3 1/2] PM / wakeup: Register wakeup class kobj after
 device is added

On Mon, Aug 19, 2019 at 10:55 AM Stephen Boyd <swboyd@...omium.org> wrote:
>
> The device_set_wakeup_enable() function can be called on a device that
> hasn't been registered with device_add() yet. This allows the device to
> be in a state where wakeup is enabled for it but the device isn't
> published to userspace in sysfs yet.
>
> After commit 986845e747af ("PM / wakeup: Show wakeup sources stats in
> sysfs"), calling device_set_wakeup_enable() will fail for a device that
> hasn't been registered with the driver core via device_add(). This is
> because we try to create sysfs entries for the device and associate a
> wakeup class kobject with it before the device has been registered.
>
> Let's follow a similar approach that device_set_wakeup_capable() takes
> here and register the wakeup class either from
> device_set_wakeup_enable() when the device is already registered, or
> from dpm_sysfs_add() when the device is being registered with the driver
> core via device_add().
>
> Fixes: 986845e747af ("PM / wakeup: Show wakeup sources stats in sysfs")
> Reported-by: Qian Cai <cai@....pw>
> Cc: Qian Cai <cai@....pw>
> Cc: Tri Vo <trong@...roid.com>
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>

Reviewed-by: Tri Vo <trong@...roid.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ