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]
Date:	Mon, 04 Nov 2013 13:24:14 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	"Liu, Chuansheng" <chuansheng.liu@...el.com>
Cc:	"Wang, Xiaoming" <xiaoming.wang@...el.com>,
	"myungjoo.ham@...sung.com" <myungjoo.ham@...sung.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Zhang, Dongxing" <dongxing.zhang@...el.com>
Subject: Re: [PATCH] [extcon]:remove freed groups caused the panic or warning
 in unregister flow

On 11/04/2013 12:47 PM, Liu, Chuansheng wrote:
> 
> 
>> -----Original Message-----
>> From: Chanwoo Choi [mailto:cw00.choi@...sung.com]
>> Sent: Monday, November 04, 2013 10:37 AM
>> To: Wang, Xiaoming
>> Cc: myungjoo.ham@...sung.com; linux-kernel@...r.kernel.org; Liu,
>> Chuansheng; Zhang, Dongxing
>> Subject: Re: [PATCH] [extcon]:remove freed groups caused the panic or warning
>> in unregister flow
> 
> 
>> As you comment, my opinion has memory leak problem. My mistake.
>> But, I prefer to call 'device_unregister' at the end of extcon_dev_unregister().
>> To resolve kernel panic, I think we could use 'devm_kzalloc' instead of
>> kzalloc/kfree.
>> What is your opinion about my approach?
>>
> That sounds good.
> But in function extcon_dev_register(), the device attributes are allocated before device_register(),
> and before device_register(), the function devm_kzalloc() can not be used.
> 

We could use 'edev->dev->parent' pointer for devm_kzalloc()
but it is ambiguous method.

OK, applied this patch.

Thanks,
Chanwoo Choi

--
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