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  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:   Sat, 13 May 2017 18:35:14 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     oprofile-list@...ts.sf.net, Robert Richter <rric@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org, Wolfram Sang <wsa@...-dreams.de>
Subject: [PATCH 2/2] oprofile_perf: Delete error messages for a failed memory
 allocation in oprofile_perf_init()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 13 May 2017 18:08:07 +0200

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/oprofile/oprofile_perf.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/oprofile/oprofile_perf.c b/drivers/oprofile/oprofile_perf.c
index 033f2c26f2ad..6de27b90b562 100644
--- a/drivers/oprofile/oprofile_perf.c
+++ b/drivers/oprofile/oprofile_perf.c
@@ -291,5 +291,3 @@ int __init oprofile_perf_init(struct oprofile_operations *ops)
-		pr_info("oprofile: failed to allocate %d "
-				"counters\n", num_counters);
 		ret = -ENOMEM;
 		num_counters = 0;
 		goto out;
@@ -299,8 +297,6 @@ int __init oprofile_perf_init(struct oprofile_operations *ops)
 		per_cpu(perf_events, cpu) = kcalloc(num_counters,
 				sizeof(struct perf_event *), GFP_KERNEL);
 		if (!per_cpu(perf_events, cpu)) {
-			pr_info("oprofile: failed to allocate %d perf events "
-					"for cpu %d\n", num_counters, cpu);
 			ret = -ENOMEM;
 			goto out;
 		}
-- 
2.12.3

Powered by blists - more mailing lists