summaryrefslogtreecommitdiff
path: root/include/linux/slab_def.h
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2021-03-16 11:06:23 +0300
committerMaxime Ripard <maxime@cerno.tech>2021-03-16 11:06:23 +0300
commitf8bade6c9a6213c2c5ba6e5bf32415ecab6e41e5 (patch)
tree474c8fb8df9797b6e0d1e562b389f575c24afc50 /include/linux/slab_def.h
parentccf953d8f3d68e85e577e843fdcde8872b0a9769 (diff)
parent51c3b916a4d7e24b4918925965867fdd9bd8dd59 (diff)
downloadlinux-f8bade6c9a6213c2c5ba6e5bf32415ecab6e41e5.tar.xz
Merge drm/drm-next into drm-misc-next
Noralf needs some patches in 5.12-rc3, and we've been delaying the 5.12 merge due to the swap issue so it looks like a good time. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'include/linux/slab_def.h')
-rw-r--r--include/linux/slab_def.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index 9eb430c163c2..3aa5e1e73ab6 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -2,6 +2,7 @@
#ifndef _LINUX_SLAB_DEF_H
#define _LINUX_SLAB_DEF_H
+#include <linux/kfence.h>
#include <linux/reciprocal_div.h>
/*
@@ -114,6 +115,8 @@ static inline unsigned int obj_to_index(const struct kmem_cache *cache,
static inline int objs_per_slab_page(const struct kmem_cache *cache,
const struct page *page)
{
+ if (is_kfence_address(page_address(page)))
+ return 1;
return cache->num;
}