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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b4a16560-9557-8d4c-d46c-2dd658bfa036@users.sourceforge.net>
Date:   Tue, 23 May 2017 22:51:20 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-mips@...ux-mips.org, Ingo Molnar <mingo@...nel.org>,
        James Hogan <james.hogan@...tec.com>,
        Kees Cook <keescook@...omium.org>,
        Marcin Nowakowski <marcin.nowakowski@...tec.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Matt Redfearn <matt.redfearn@...tec.com>,
        Paul Burton <paul.burton@...tec.com>,
        Ralf Bächle <ralf@...ux-mips.org>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 1/5] MIPS: pm-cps: Delete an error message for a failed memory
 allocation in cps_pm_online_cpu()

>From c7eaa7be6235b37023b23b40b36737f72e5b4b3f Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 23 May 2017 21:30:11 +0200
Subject: [PATCH 1/5] MIPS: pm-cps: Delete an error message for a failed memory allocation in cps_pm_online_cpu()

Omit an extra message 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>
---
 arch/mips/kernel/pm-cps.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c
index 5f928c34c148..d662838e418f 100644
--- a/arch/mips/kernel/pm-cps.c
+++ b/arch/mips/kernel/pm-cps.c
@@ -666,7 +666,6 @@ static int cps_pm_online_cpu(unsigned int cpu)
-		if (!core_rc) {
-			pr_err("Failed allocate core %u ready_count\n", core);
+		if (!core_rc)
 			return -ENOMEM;
-		}
+
 		per_cpu(ready_count_alloc, core) = core_rc;
 
 		/* Ensure ready_count is aligned to a cacheline boundary */
-- 
2.13.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ