lkml.org 
[lkml]   [2007]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    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 <--

    local_irq_disable();
    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?

    Cyrill

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

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