History

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>

Kefeng Wang committed 9 years ago

Commit 166ad0e1 parent 53855d11 file · +1 −0Browse files

Unified · Split

kernel/kcov.c+1−0
@@ -7,6 +7,7 @@ · 6 unmodified lines
77 #include <linux/fs.h>
88 #include <linux/mm.h>
99 #include <linux/printk.h>
10+#include <linux/sched.h>
1011 #include <linux/slab.h>
1112 #include <linux/spinlock.h>
1213 #include <linux/vmalloc.h>