[lkml]   [2007]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] slab: deal with NULL pointers passed to kmem_cache_free
    On Wed, 21 March 2007 08:30:27 -0800, Andrew Morton wrote:
    > On Wed, 21 Mar 2007 16:41:19 +0200 "Pekka Enberg" <> wrote:
    > > Yeah, I'll try to sneak a patch past Andrew.
    > That would be sneaky.
    > Thing is, such a patch would amount to adding a test-for-NULL to codepaths
    > which we *know* do not need it. There is no point in doing that.

    How about two patches, one renaming kmem_cache_free to
    kmem_cache_free_fast or __kmem_cache_free or whatever pleases you most,
    the second adding kmem_cache_free with a NULL check.

    The point is that the easiest way to use kmem_cache_free should be the
    safest, but not necessarily the fastest. Existing well-tuned and
    NULL-aware code paths can remain fast, random new code will be safe.


    Joern's library part 14:
    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-21 19:03    [W:0.025 / U:4.408 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site