Re: [RFC] Common code 04/12] slabs: Extract common code for kmem_cache_create

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/5/19 Christoph Lameter <cl@xxxxxxxxx>:
> This patch has the effect of adding sanity checks for SLUB and SLOB
> under CONFIG_DEBUG_VM and removes the checks in SLAB for !CONFIG_DEBUG_VM.

If !CONFIG_DEBUG_VM,
code for sanity checks remain in __kmem_cache_create in slab.c, doesn't it?

> +#ifdef CONFIG_DEBUG_VM
> +       if (!name || in_interrupt() || size < sizeof(void *) ||
> +               size > KMALLOC_MAX_SIZE) {
> +               printk(KERN_ERR "kmem_cache_create(%s) integrity check"
> +                       " failed\n", name);
> +               goto out;
> +       }
> +#endif

Currently, when !CONFIG_DEBUG_VM, name check is handled differently in
sl[aou]bs.
slob worked with !name, but slab, slub return NULL.
So I think some change is needed for name handling.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]