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: <tip-765d28f136291f9639e3c031a1070fb76d6625c7@git.kernel.org>
Date:   Thu, 2 Aug 2018 05:31:54 -0700
From:   tip-bot for Chengguang Xu <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     cgxu519@....com, tglx@...utronix.de, mingo@...nel.org,
        hpa@...or.com, linux-kernel@...r.kernel.org
Subject: [tip:x86/mm] x86/mm: Remove redundant check for kmem_cache_create()

Commit-ID:  765d28f136291f9639e3c031a1070fb76d6625c7
Gitweb:     https://git.kernel.org/tip/765d28f136291f9639e3c031a1070fb76d6625c7
Author:     Chengguang Xu <cgxu519@....com>
AuthorDate: Tue, 12 Jun 2018 19:48:52 +0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 2 Aug 2018 14:27:35 +0200

x86/mm: Remove redundant check for kmem_cache_create()

The flag 'SLAB_PANIC' implies panic on failure, So there is no need to
check the returned pointer for NULL.

Signed-off-by: Chengguang Xu <cgxu519@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: hpa@...or.com
Link: https://lkml.kernel.org/r/1528804132-154948-1-git-send-email-cgxu519@gmx.com

---
 arch/x86/mm/pgtable.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
index e3deefb891da..0f1683fcb196 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -329,9 +329,6 @@ static int __init pgd_cache_init(void)
 	 */
 	pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_ALIGN,
 				      SLAB_PANIC, NULL);
-	if (!pgd_cache)
-		return -ENOMEM;
-
 	return 0;
 }
 core_initcall(pgd_cache_init);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ