[lkml]   [2007]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[QUESTION] check for mem in slab
    Hi list,

    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 <--

    BUG_ON(cpu_cache_get(&cache_cache) != &initarray_cache.cache);
    memcpy(ptr, cpu_cache_get(&cache_cache),
    sizeof(struct arraycache_init));


    is that OK? or it's a bug?


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-03-29 18:17    [W:0.018 / U:1.140 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site