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] [day] [month] [year] [list]
Message-ID: <45310800.nJ51lTlq64@kreacher>
Date:   Wed, 25 Mar 2020 11:37:49 +0100
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Neeraj Upadhyay <neeraju@...eaurora.org>
Cc:     pavel@....cz, len.brown@...el.com, gregkh@...uxfoundation.org,
        swboyd@...omium.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, irgeorgiev@...eaurora.org,
        linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH] PM / wakeup: Skip wakeup_source_sysfs_remove if device is not added

On Monday, March 23, 2020 6:08:51 AM CET Neeraj Upadhyay wrote:
> Skip wakeup_source_sysfs_remove(), to fix null pinter access of
> ws->dev, if wakeup source is unregistered before wakeup class
> is registered from device_add().
> 
> Fixes: 2ca3d1ecb8c4 ("PM / wakeup: Register wakeup class kobj after device is added")
> Signed-off-by: Neeraj Upadhyay <neeraju@...eaurora.org>
> ---
>  drivers/base/power/wakeup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
> index 27f3e60..f8f8c0a 100644
> --- a/drivers/base/power/wakeup.c
> +++ b/drivers/base/power/wakeup.c
> @@ -241,7 +241,8 @@ void wakeup_source_unregister(struct wakeup_source *ws)
>  {
>  	if (ws) {
>  		wakeup_source_remove(ws);
> -		wakeup_source_sysfs_remove(ws);
> +		if (ws->dev)
> +			wakeup_source_sysfs_remove(ws);
>  		wakeup_source_destroy(ws);
>  	}
>  }
> 

Applied (with some minor changes) as 5.7 material, thanks!



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ