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]
Date:	Tue, 7 Jan 2014 18:22:51 +0000
From:	Jitendra Kalsaria <jitendra.kalsaria@...gic.com>
To:	Wei Yongjun <weiyj.lk@...il.com>,
	Himanshu Madhani <himanshu.madhani@...gic.com>,
	Rajesh Borundia <rajesh.borundia@...gic.com>,
	Shahed Shaikh <shahed.shaikh@...gic.com>,
	Sony Chacko <sony.chacko@...gic.com>,
	Sucheta Chakraborty <sucheta.chakraborty@...gic.com>
CC:	"yongjun_wei@...ndmicro.com.cn" <yongjun_wei@...ndmicro.com.cn>,
	"Dept-Eng Linux Driver" <Linux-Driver@...gic.com>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH -next] qlcnic: use vzalloc() instead of
 vmalloc()/memset(0)


On 1/7/14 5:48 AM, "Wei Yongjun" <weiyj.lk@...il.com> wrote:

>From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
>Use vzalloc() instead of vmalloc() and memset(0).
>
>Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>---
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Acked-by: Jitendra Kalsaria <jitendra.kalsaria@...gic.com>
>
>diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
>b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
>index b529667..16912e2 100644
>--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
>+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
>@@ -935,11 +935,10 @@ static ssize_t qlcnic_sysfs_read_pci_config(struct
>file *file,
> 		return QL_STATUS_INVALID_PARAM;
> 
> 	pci_info_sz = pci_func_count * sizeof(*pci_info);
>-	pci_info = vmalloc(pci_info_sz);
>+	pci_info = vzalloc(pci_info_sz);
> 	if (!pci_info)
> 		return -ENOMEM;
> 
>-	memset(pci_info, 0, pci_info_sz);
> 	memset(buf, 0, pci_cfg_sz);
> 	pci_cfg = (struct qlcnic_pci_func_cfg *)buf;
> 
>

Thanks,
Jiten

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ