aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-09-23 16:24:10 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-23 16:35:37 -0400
commitdbdb90450059e17e8e005ebd3ce0a1fd6008a0c8 (patch)
tree0dc0220667566698e5c602bcd408d4255c86037a /mm/slab.c
parent86513e726b494796175b6c4fdd705797f01b0ca2 (diff)
[PATCH] revert oversized kmalloc check
As davem points out, this wasn't such a great idea. There may be some code which does: size = 1024*1024; while (kmalloc(size, ...) == 0) size /= 2; which will now explode. Cc: "David S. Miller" <davem@davemloft.net> Cc: Christoph Lameter <christoph@lameter.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c
index ad113c431e39..c9adfce00405 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2907,7 +2907,8 @@ void *__kmalloc(size_t size, unsigned int __nocast flags)
2907 * functions. 2907 * functions.
2908 */ 2908 */
2909 cachep = __find_general_cachep(size, flags); 2909 cachep = __find_general_cachep(size, flags);
2910 BUG_ON(!cachep); /* Allocation size too large for kmalloc */ 2910 if (unlikely(cachep == NULL))
2911 return NULL;
2911 return __cache_alloc(cachep, flags); 2912 return __cache_alloc(cachep, flags);
2912} 2913}
2913EXPORT_SYMBOL(__kmalloc); 2914EXPORT_SYMBOL(__kmalloc);