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, 11 Mar 2013 03:02:17 -0700
From:	tip-bot for Alexandru Gheorghiu <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	gheorghiuandru@...il.com, tglx@...utronix.de
Subject: [tip:x86/platform] x86/platform/uv: Replace kmalloc()
  & memset with kzalloc()

Commit-ID:  e87b686b5109e171438a0529828d3109b7ad6da3
Gitweb:     http://git.kernel.org/tip/e87b686b5109e171438a0529828d3109b7ad6da3
Author:     Alexandru Gheorghiu <gheorghiuandru@...il.com>
AuthorDate: Sat, 9 Mar 2013 11:40:43 +0200
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 11 Mar 2013 08:33:01 +0100

x86/platform/uv: Replace kmalloc() & memset with kzalloc()

This was found using coccicheck.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@...il.com>
Link: http://lkml.kernel.org/r/1362822043-15559-1-git-send-email-gheorghiuandru@gmail.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/platform/uv/uv_time.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/platform/uv/uv_time.c b/arch/x86/platform/uv/uv_time.c
index 98718f6..5c86786 100644
--- a/arch/x86/platform/uv/uv_time.c
+++ b/arch/x86/platform/uv/uv_time.c
@@ -159,10 +159,9 @@ static __init int uv_rtc_allocate_timers(void)
 {
 	int cpu;
 
-	blade_info = kmalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL);
+	blade_info = kzalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL);
 	if (!blade_info)
 		return -ENOMEM;
-	memset(blade_info, 0, uv_possible_blades * sizeof(void *));
 
 	for_each_present_cpu(cpu) {
 		int nid = cpu_to_node(cpu);
--
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