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:	Sun, 31 Oct 2010 15:13:57 GMT
From:	tip-bot for Jesper Juhl <jj@...osbits.net>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	arjan@...radead.org, jj@...osbits.net, tglx@...utronix.de,
	wli@...omorphy.com, mingo@...e.hu
Subject: [tip:perf/core] profile: Use vzalloc() rather than vmalloc() & memset()

Commit-ID:  559fa6e76b271b98ff641fa2a968aa2439e43c28
Gitweb:     http://git.kernel.org/tip/559fa6e76b271b98ff641fa2a968aa2439e43c28
Author:     Jesper Juhl <jj@...osbits.net>
AuthorDate: Sat, 30 Oct 2010 21:56:26 +0200
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Sun, 31 Oct 2010 09:47:26 +0100

profile: Use vzalloc() rather than vmalloc() & memset()

There's no reason to memset() manually when we have vzalloc().

Signed-off-by: Jesper Juhl <jj@...osbits.net>
Cc: Arjan van de Ven <arjan@...radead.org>
Cc: William Irwin <wli@...omorphy.com>
LKML-Reference: <alpine.LNX.2.00.1010302150310.1572@...mpdragon.chaosbits.net>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 kernel/profile.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/profile.c b/kernel/profile.c
index 66f841b..14c9f87 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -126,11 +126,9 @@ int __ref profile_init(void)
 	if (prof_buffer)
 		return 0;
 
-	prof_buffer = vmalloc(buffer_bytes);
-	if (prof_buffer) {
-		memset(prof_buffer, 0, buffer_bytes);
+	prof_buffer = vzalloc(buffer_bytes);
+	if (prof_buffer)
 		return 0;
-	}
 
 	free_cpumask_var(prof_cpu_mask);
 	return -ENOMEM;
--
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