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: <5d523cf8-1540-e704-2301-a5e0205cb536@users.sourceforge.net>
Date:   Mon, 22 May 2017 16:13:11 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
        rds-devel@....oracle.com, "David S. Miller" <davem@...emloft.net>,
        Santosh Shilimkar <santosh.shilimkar@...cle.com>,
        Sowmini Varadhan <sowmini.varadhan@...cle.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 3/3] RDS: TCP: Delete an error message for a failed memory
 allocation in rds_tcp_init_net()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 22 May 2017 15:45:31 +0200

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>
---
 net/rds/tcp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 431404dbdad1..b0348697dee5 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -431,10 +431,9 @@ static __net_init int rds_tcp_init_net(struct net *net)
 	} else {
 		tbl = kmemdup(rds_tcp_sysctl_table,
 			      sizeof(rds_tcp_sysctl_table), GFP_KERNEL);
-		if (!tbl) {
-			pr_warn("could not set allocate syctl table\n");
+		if (!tbl)
 			return -ENOMEM;
-		}
+
 		rtn->ctl_table = tbl;
 	}
 	tbl[RDS_TCP_SNDBUF].data = &rtn->sndbuf_size;
-- 
2.13.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ