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, 19 Dec 2012 11:08:34 +0530
From:	Venu Byravarasu <vbyravarasu@...dia.com>
To:	Stephen Warren <swarren@...dotorg.org>
CC:	"balbi@...com" <balbi@...com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: RE: [PATCH] usb: phy: tegra: Using devm API for memory allocation

> -----Original Message-----
> From: Stephen Warren [mailto:swarren@...dotorg.org]
> Sent: Tuesday, December 18, 2012 10:03 PM
> To: Venu Byravarasu
> Cc: balbi@...com; gregkh@...uxfoundation.org; linux-
> kernel@...r.kernel.org; linux-usb@...r.kernel.org
> Subject: Re: [PATCH] usb: phy: tegra: Using devm API for memory allocation
> 
> On 12/17/2012 11:21 PM, Venu Byravarasu wrote:
> > Using devm_kzalloc for allocating memory needed for PHY
> > pointer and hence removing kfree calls to PHY pointer.
> 
> Since the kfree() here used to be in tegra_usb_phy_close() rather than
> any remove() function, does it actually make sense to use
> devm_kzalloc(); would plain using kzalloc() instead, and not removing
> the kfree() calls, be better?
> 
 
Stephen,
As you mentioned I can replace kmalloc with kzalloc in the original code 
and push an updated patch.
However, I just wanted to understand if there exists any issue
in using devm_kzalloc instead of kzalloc?

> When the PHY code gets converted to be an actual probed driver, then
> perhaps using devm will make sense.
--
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