summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2016-06-02 14:20:32 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-06-14 00:38:56 +0200
commit678309117768e25751594a48a2d873b0552a3130 (patch)
tree05fd4cf2a758f3ed26683ebe4f9aa0278046feef /kernel/power
parentLinux 4.7-rc3 (diff)
downloadlinux-678309117768e25751594a48a2d873b0552a3130.tar.xz
linux-678309117768e25751594a48a2d873b0552a3130.zip
PM / Hibernate: Don't let kasan instrument snapshot.c
Kasan causes the compiler to instrument C code and is used at runtime to detect accesses to memory that has been freed, or not yet allocated. The code in snapshot.c saves and restores memory when hibernating. This will access whole pages in the slab cache that have both free and allocated areas, resulting in a large number of false positives from Kasan. Disable instrumentation of this file. Signed-off-by: James Morse <james.morse@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/power/Makefile b/kernel/power/Makefile
index cb880a14cc39..eb4f717705ba 100644
--- a/kernel/power/Makefile
+++ b/kernel/power/Makefile
@@ -1,6 +1,8 @@
ccflags-$(CONFIG_PM_DEBUG) := -DDEBUG
+KASAN_SANITIZE_snapshot.o := n
+
obj-y += qos.o
obj-$(CONFIG_PM) += main.o
obj-$(CONFIG_VT_CONSOLE_SLEEP) += console.o