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: <201208092130.15813.rjw@sisk.pl>
Date:	Thu, 9 Aug 2012 21:30:15 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Marek Szyprowski <m.szyprowski@...sung.com>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Kyungmin Park <kyungmin.park@...sung.com>
Subject: Re: [PATCH] PM / Domains: fix early device initialization failure

On Thursday, August 09, 2012, Marek Szyprowski wrote:
> dev_pm_get_subsys_data() returns 1 when a new object has been created,
> what should not be considered as an error for pm_genpd_add_device().
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>

This has been reported twice already and there's a patch in linux-next
to fix this issue.  And your patch is incomplete. :-)

Thanks,
Rafael


> ---
>  drivers/base/power/domain.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index ba3487c..6b61819 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -1323,9 +1323,16 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
>  		}
>  
>  	ret = dev_pm_get_subsys_data(dev);
> -	if (ret)
> +
> +	if (ret < 0)
>  		goto out;
>  
> +	/*
> +	 * dev_pm_get_subsys_data() returns 1 when new object has been created
> +	 */
> +	if (ret == 1)
> +		ret = 0;
> +
>  	genpd->device_count++;
>  	genpd->max_off_time_changed = true;
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ