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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140128183035.GC20789@katana>
Date:	Tue, 28 Jan 2014 19:30:35 +0100
From:	Wolfram Sang <wsa@...-dreams.de>
To:	"xinhui.pan" <xinhuix.pan@...el.com>
Cc:	linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
	mika.westerberg@...ux.intel.com, andriy.shevchenko@...ux.intel.com,
	yanmin_zhang@...ux.intel.com, bo.he@...el.com
Subject: Re: [PATCH] i2c-designware-pcidrv: fix the incorrect return of idle
 callback

On Tue, Jan 28, 2014 at 01:48:28PM +0800, xinhui.pan wrote:
> From: "xinhui.pan" <xinhuix.pan@...el.com>
> 
> i2c_dw_pci_runtime_idle should return -EBUSY rather than zero if it do success.

I don't understand...

> Otherwise rpm_idle will call pm_suspend again and that may cause pm_schedule_suspend delay invalidate.
> 	
> Signed-off-by: bo.he <bo.he@...el.com>
> Signed-off-by: xinhui.pan <xinhuix.pan@...el.com>
> ---
>  drivers/i2c/busses/i2c-designware-pcidrv.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
> index f6ed06c..96e81f6 100644
> --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -190,8 +190,8 @@ static int i2c_dw_pci_runtime_idle(struct device *dev)
>  	int err = pm_schedule_suspend(dev, 500);
>  	dev_dbg(dev, "runtime_idle called\n");
>  
> -	if (err != 0)
> -		return 0;
> +	if (err)
> +		return err;
>  	return -EBUSY;

... it does return EBUSY when pm_schedule_suspend() succeeds? It only
returns 0 if it does not succeed (for which I don't know if this is an
apropriate behaviour). Mika?

>  }
>  
> -- 
> 1.7.9.5

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ