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>] [day] [month] [year] [list]
Message-ID: <dcbe18c8-a7e3-b26e-a95b-2d3cc2531081@users.sourceforge.net>
Date:   Sun, 13 Aug 2017 19:36:02 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-ima-devel@...ts.sourceforge.net,
        linux-ima-user@...ts.sourceforge.net,
        linux-security-module@...r.kernel.org,
        Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
        James Morris <james.l.morris@...cle.com>,
        Mimi Zohar <zohar@...ux.vnet.ibm.com>,
        "Serge E. Hallyn" <serge@...lyn.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH] ima: Delete an error message for a failed memory allocation
 in ima_add_digest_entry()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 13 Aug 2017 19:29:11 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 security/integrity/ima/ima_queue.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c
index a02a86d51102..3b60e72aecb2 100644
--- a/security/integrity/ima/ima_queue.c
+++ b/security/integrity/ima/ima_queue.c
@@ -100,10 +100,9 @@ static int ima_add_digest_entry(struct ima_template_entry *entry,
 	unsigned int key;
 
 	qe = kmalloc(sizeof(*qe), GFP_KERNEL);
-	if (qe == NULL) {
-		pr_err("OUT OF MEMORY ERROR creating queue entry\n");
+	if (!qe)
 		return -ENOMEM;
-	}
+
 	qe->entry = entry;
 
 	INIT_LIST_HEAD(&qe->later);
-- 
2.14.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ