lkml.org 
[lkml]   [2012]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH RFC v2] slab: introduce kmalloc_array
    On Thu, 9 Feb 2012 14:42:49 -0800 (PST)
    David Rientjes <rientjes@google.com> wrote:

    > On Thu, 9 Feb 2012, Xi Wang wrote:
    >
    > > This patch introduces a kmalloc_array() wrapper that performs integer
    > > overflow checking without zeroing the memory.
    > >
    > > Suggested-by: Andrew Morton <akpm@linux-foundation.org>
    > > Suggested-by: Jens Axboe <axboe@kernel.dk>
    > > Signed-off-by: Xi Wang <xi.wang@gmail.com>
    >
    > Acked-by: David Rientjes <rientjes@google.com>
    >
    > assuming there's at least one new user or one existing user that can be
    > modified to use the new interface and this won't just sit around not being
    > used.

    The need is there - I've whined about the absence of kmalloc_array()
    maybe 3 times in the past year.

    Often kcalloc() is suitable - quite a lot of arrays which are sized
    based on a userspace-provided dimension are also zeroed out. For some
    reason.



    \
     
     \ /
      Last update: 2012-02-10 00:11    [W:0.019 / U:60.052 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site