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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 29 Sep 2009 21:42:25 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Pekka Enberg <penberg@...helsinki.fi>
cc:	Nick Piggin <npiggin@...e.de>, linux-kernel@...r.kernel.org
Subject: [patch] slqb: remove unnecessary conditional in kmem_cache_create

kmem_cache_open() panics when a SLAB_PANIC cache cannot be opened because
it has early callers using the flag that do not go through
kmem_cache_create().

If kmem_cache_open() fails for a SLAB_PANIC cache, it would have panicked
the machine.  Thus, checking for this flag in kmem_cache_create() is
unnecessary in the error patch since it is always clear.

Cc: Nick Piggin <npiggin@...e.de>
Signed-off-by: David Rientjes <rientjes@...gle.com>
---
 mm/slqb.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/mm/slqb.c b/mm/slqb.c
--- a/mm/slqb.c
+++ b/mm/slqb.c
@@ -3077,9 +3077,6 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
 
 err:
 	up_write(&slqb_lock);
-	if (flags & SLAB_PANIC)
-		panic("%s: failed to create slab `%s'\n", __func__, name);
-
 	return NULL;
 }
 EXPORT_SYMBOL(kmem_cache_create);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ