aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-18 06:27:47 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-18 06:27:47 -1000
commit4c3577c58f7efcddeaa269e7ddbe75e8acfbb7de (patch)
tree08ebab417225d5e06bfbd1f5c8aab7d4155efaf9 /mm
parent2601ded7fd8827ddbcc450cbfb153b3f3c59b443 (diff)
parent907985f48bc60818e291c631249f9bc84c83a06f (diff)
Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/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
Diffstat (limited to 'mm')
-rw-r--r--mm/slab_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index ff3218a0f5e..2d414508e9e 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -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)