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:	Wed, 18 May 2016 20:07:05 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	Caizhiyong <caizhiyong@...ilicon.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"kyungmin.park@...sung.com" <kyungmin.park@...sung.com>,
	"myungjoo.ham@...sung.com" <myungjoo.ham@...sung.com>,
	lkml <linux-kernel@...r.kernel.org>
Cc:	"Wanli (welly)" <welly.wan@...ilicon.com>,
	"Wangming (Wonder)" <mingwonder.wang@...ilicon.com>,
	Quyaxin <quyaxin@...ilicon.com>
Subject: Re: [PATCH] devfreq: fix double call put_device

Hi Cai,

On 2016년 05월 14일 15:28, Caizhiyong wrote:
> From: Cai Zhiyong <caizhiyong@...wei.com>
> Date: Sat, 14 May 2016 14:13:30 +0800
> Subject: [PATCH] devfreq: fix double call put_device

The patch description don't need to include the 'Date/Subject'.
You need to delete them.

> 
> 1295  */
> 1296 void device_unregister(struct device *dev)
> 1297 {
> 1298         pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
> 1299         device_del(dev);
> 1300         put_device(dev);
> 1301 }
> 1302 EXPORT_SYMBOL_GPL(device_unregister);
> 1303

Also, you don't need to include the source code of device_unregister()
because below description explains the why this patch is needed.

> 
> device_unregister is called put_device, there is no need to call
> put_device(&devfreq->dev) again.
> 
> Signed-off-by: Cai Zhiyong <caizhiyong@...wei.com>
> ---
>  drivers/devfreq/devfreq.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 1d6c803..8de22c0 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -621,7 +621,6 @@ int devfreq_remove_device(struct devfreq *devfreq)
>  		return -EINVAL;
>  
>  	device_unregister(&devfreq->dev);
> -	put_device(&devfreq->dev);
>  
>  	return 0;
>  }
> 

If you modify the patch description, Looks good to me.

Reviewed-by: Chanwoo Choi <cw00.choi@...sung.com>

Thanks,
Chanwoo Choi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ