[lkml]   [2009]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Q, slab, kmemleak_erase() and redzone?

    Pekka Enberg:
    > No. The pointer returned by cpu_cache_get() is not changed by
    > cache_alloc_refill(). The contents of the array might change, yes. That
    > said, we should check if objp is NULL before calling kmemleak_erase().

    To test whether objp is NULL or not is another issue.
    'ac' is changed actually. You can confirm it by inserting
    WARN_ON_ONCE(ac != cpu_cache_get(cachep));
    after cache_alloc_refill() in ____cache_alloc().

    And do you think these comments/code in cache_alloc_refill() are wrong?
    x = cache_grow(cachep, flags | GFP_THISNODE, node, NULL);

    /* cache_grow can reenable interrupts, then ac could change. */
    ac = cpu_cache_get(cachep);

    J. R. Okajima

     \ /
      Last update: 2009-12-02 04:25    [W:0.017 / U:6.972 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site