Re: [PATCH] slub: Potential stack overflow

From: Christoph Lameter
Date: Wed Mar 24 2010 - 15:49:46 EST


On Wed, 24 Mar 2010, Eric Dumazet wrote:

> Are we allowed to nest in these two functions ?

This is kmem_cache_close() no danger of nesting.

> These are debugging functions, what happens if kmalloc() returns NULL ?

Then you return ENOMEM and the user gets an error. We already do that in
validate_slab_cache().

Hmmm... In this case we called from list_slab_objects() which gets called
from free_partial() (which took a spinlock!) which gets called from
kmem_cache_close().

Its just a debugging aid so no problem if it fails. GFP_ATOMIC?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/