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]
Date:	Fri, 29 Jan 2016 17:38:12 +0200
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	Tomeu Vizoso <tomeu.vizoso@...labora.com>
Cc:	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	martyn.welch@...labora.co.uk, Ulf Hansson <ulf.hansson@...aro.org>,
	Daniel Kurtz <djkurtz@...omium.org>,
	David Airlie <airlied@...ux.ie>,
	Tomas Winkler <tomas.winkler@...el.com>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	dri-devel@...ts.freedesktop.org,
	Russell King <linux@....linux.org.uk>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Kevin Hilman <khilman@...nel.org>,
	Tony Lindgren <tony@...mide.com>, Len Brown <lenb@...nel.org>,
	Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
	Pavel Machek <pavel@....cz>,
	linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v12 2/4] PM / Domains: add setter for dev.pm_domain

On Thu, Jan 7, 2016 at 5:46 PM, Tomeu Vizoso <tomeu.vizoso@...labora.com> wrote:
> Adds a function that sets the pointer to dev_pm_domain in struct device
> and that warns if the device has already finished probing. The reason
> why we want to enforce that is because in the general case that can
> cause problems and also that we can simplify code quite a bit if we can
> always assume that.
>
> This patch also changes all current code that directly sets the
> dev.pm_domain pointer.


> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c

> @@ -875,13 +876,14 @@ static int acpi_lpss_platform_notify(struct notifier_block *nb,
>
>         switch (action) {
>         case BUS_NOTIFY_BIND_DRIVER:
> -               pdev->dev.pm_domain = &acpi_lpss_pm_domain;
> +               dev_pm_domain_set(&pdev->dev, &acpi_lpss_pm_domain);
>                 break;
>         case BUS_NOTIFY_DRIVER_NOT_BOUND:
>         case BUS_NOTIFY_UNBOUND_DRIVER:
>                 pdev->dev.pm_domain = NULL;

Missed?

>                 break;
>         case BUS_NOTIFY_ADD_DEVICE:
> +               dev_pm_domain_set(&pdev->dev, &acpi_lpss_pm_domain);
>                 if (pdata->dev_desc->flags & LPSS_LTR)
>                         return sysfs_create_group(&pdev->dev.kobj,
>                                                   &lpss_attr_group);
> @@ -889,6 +891,7 @@ static int acpi_lpss_platform_notify(struct notifier_block *nb,
>         case BUS_NOTIFY_DEL_DEVICE:
>                 if (pdata->dev_desc->flags & LPSS_LTR)
>                         sysfs_remove_group(&pdev->dev.kobj, &lpss_attr_group);
> +               dev_pm_domain_set(&pdev->dev, NULL);
>                 break;
>         default:
>                 break;

This looks wrong. I didn't test yet, but I have concerns here. Why did
you add those calls?

Have you been aware about the commit b5f88dd1d6ef ("Revert "ACPI /
LPSS: allow to use specific PM domain during ->probe()") ?

Sorry for being too late with this.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ