summaryrefslogtreecommitdiff
path: root/kernel/kcov.c
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2016-12-07 14:44:36 -0800
committerPaul Lawrence <paullawrence@google.com>2017-12-18 09:41:57 -0800
commit2b86624bff9d403f5ec3e7583096be91eb924c2c (patch)
tree115c7b120125fd562c55670e4f3b70527d74c0d1 /kernel/kcov.c
parentd1c5c9c2c635018f06f3f0c726f4b9ff2283a406 (diff)
UPSTREAM: kcov: add missing #include <linux/sched.h>
In __sanitizer_cov_trace_pc we use task_struct and fields within it, but as we haven't included <linux/sched.h>, it is not guaranteed to be defined. While we usually happen to acquire the definition through a transitive include, this is fragile (and hasn't been true in the past, causing issues with backports). Include <linux/sched.h> to avoid any fragility. [mark.rutland@arm.com: rewrote changelog] Link: http://lkml.kernel.org/r/1481007384-27529-1-git-send-email-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: James Morse <james.morse@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Bug: 64145065 (cherry-picked from 166ad0e1e2132ff0cda08b94af8301655fcabbcd) Change-Id: Id5a06b927687ace8788f623fc91cc8305fde5f2d Signed-off-by: Paul Lawrence <paullawrence@google.com>
Diffstat (limited to 'kernel/kcov.c')
-rw-r--r--kernel/kcov.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/kcov.c b/kernel/kcov.c
index e9bb8f59711f..4e631f8072dc 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -7,6 +7,7 @@
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/printk.h>
+#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/vmalloc.h>