Skip to content

Commit

Permalink
Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/penberg/linux

Pull SLAB fix from Pekka Enberg:
 "A slab regression fix by Sasha Levin"

* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
  slab: prevent warnings when allocating with __GFP_NOWARN
  • Loading branch information
Linus Torvalds committed Jun 18, 2013
2 parents 2601ded + 907985f commit 4c3577c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mm/slab_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,10 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
{
int index;

if (WARN_ON_ONCE(size > KMALLOC_MAX_SIZE))
if (size > KMALLOC_MAX_SIZE) {
WARN_ON_ONCE(!(flags & __GFP_NOWARN));
return NULL;
}

if (size <= 192) {
if (!size)
Expand Down

0 comments on commit 4c3577c

Please sign in to comment.