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-next>] [day] [month] [year] [list]
Date:	Tue, 7 Jan 2014 21:48:24 +0800
From:	Wei Yongjun <weiyj.lk@...il.com>
To:	himanshu.madhani@...gic.com, rajesh.borundia@...gic.com,
	shahed.shaikh@...gic.com, jitendra.kalsaria@...gic.com,
	sony.chacko@...gic.com, sucheta.chakraborty@...gic.com
Cc:	yongjun_wei@...ndmicro.com.cn, linux-driver@...gic.com,
	netdev@...r.kernel.org
Subject: [PATCH -next] qlcnic: use vzalloc() instead of vmalloc()/memset(0)

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

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;
 

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