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]
Message-ID: <b2665375-17e1-6c7d-94c6-d1ff8938bfc3@users.sourceforge.net>
Date:   Sat, 20 May 2017 21:16:45 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Arnd Bergmann <arnd@...db.de>, Jan Kara <jack@...e.cz>,
        Jesper Nilsson <jesper.nilsson@...s.com>,
        Kumar Gala <galak@...nel.crashing.org>,
        Lorenzo Stoakes <lstoakes@...il.com>,
        Michal Hocko <mhocko@...e.com>,
        Timur Tabi <timur@...escale.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org, Wolfram Sang <wsa@...-dreams.de>
Subject: [PATCH 5/5] fsl_hypervisor: Delete error messages for failed memory
 allocations in ioctl_memcpy()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 20 May 2017 20:27:23 +0200

Omit two extra messages for memory allocation failures 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/virt/fsl_hypervisor.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index 4031632b8c9d..db07c76f1ff7 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -227,7 +227,5 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)
-	if (!pages) {
-		pr_debug("fsl-hv: could not allocate page list\n");
+	if (!pages)
 		return -ENOMEM;
-	}
 
 	/*
 	 * sg_list is the list of fh_sg_list objects that we pass to the
@@ -238,5 +236,4 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)
 	if (!sg_list_unaligned) {
-		pr_debug("fsl-hv: could not allocate S/G list\n");
 		ret = -ENOMEM;
 		goto exit;
 	}
-- 
2.13.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ