Hi, > On 3/30/07, Heiko Carstens wrote: > >> in file mm/slab.c and routine kmem_cache_init() I found there > >> is no checking for allocated memory on line: > >> > >> /* 4) Replace the bootstrap head arrays */ > >> { > >> struct array_cache *ptr; > >> > >> ptr = kmalloc(sizeof(struct arraycache_init), GFP_KERNEL); > >> > >> --> no check for ptr == NULL <-- > >[...] > >> is that OK? or it's a bug? > > > >It's ok. If that allocation fails your machine won't come up anyway. > > We ought to add a BUG_ON or comment at least there as this keeps > popping up again and again. Done. Patch attached. Signed-off-by: Johannes Weiner