From: Christoph Lameter Date: Fri, 23 Sep 2005 04:44:10 +0000 (-0700) Subject: [PATCH] __kmalloc: Generate BUG if size requested is too large. X-Git-Tag: v2.6.14-rc3~51^2~42 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eafb42707b21beb42bba4eae7b742f837ee9d2e0;p=pandora-kernel.git [PATCH] __kmalloc: Generate BUG if size requested is too large. I had an issue on ia64 where I got a bug in kernel/workqueue because kzalloc returned a NULL pointer due to the task structure getting too big for the slab allocator. Usually these cases are caught by the kmalloc macro in include/linux/slab.h. Compilation will fail if a too big value is passed to kmalloc. However, kzalloc uses __kmalloc which has no check for that. This patch makes __kmalloc bug if a too large entity is requested. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed