Nick Piggin <[email protected]> wrote:
>
> #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \
> - __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \
> - __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP)
> + __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL| \
> + __GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP|__GFP_ZERO)
Passing GFP_ZERO into kmem_cache_alloc() is such a bizarre thing to do,
perhaps a BUG is the correct response.
I guess it could be argued that the kmem_cache_alloc() callers "knows" that
the ctor will be zeroing out all the objects, but it would seem cleaner to
me to pass the "you should use GFP_ZERO" hint into kmem_cache_create()
rather than kmem_cache_alloc().
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]