summaryrefslogtreecommitdiff
path: root/mm/kmemcheck.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2016-02-04 14:11:04 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2016-02-04 14:11:04 +1100
commit3c812e75159797e730cdf5faa53b58ef9a4336da (patch)
tree7e542b7294db4967fa3f20e834d70f9b70fefea2 /mm/kmemcheck.c
parent01ae1d78d3d7977bbde8c54bdec1f851ce128e78 (diff)
parent1c631f58d55a527fa0f5c83277c9b724c9983c38 (diff)
downloadlinux-next-3c812e75159797e730cdf5faa53b58ef9a4336da.tar.gz
Merge branch 'akpm-current/current'
Diffstat (limited to 'mm/kmemcheck.c')
-rw-r--r--mm/kmemcheck.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/kmemcheck.c b/mm/kmemcheck.c
index cab58bb592d8..6f4f424037c0 100644
--- a/mm/kmemcheck.c
+++ b/mm/kmemcheck.c
@@ -60,6 +60,9 @@ void kmemcheck_free_shadow(struct page *page, int order)
void kmemcheck_slab_alloc(struct kmem_cache *s, gfp_t gfpflags, void *object,
size_t size)
{
+ if (unlikely(!object)) /* Skip object if allocation failed */
+ return;
+
/*
* Has already been memset(), which initializes the shadow for us
* as well.