Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kcov: Remove kcov include from sched.h and move it to its users.

The recent addition of in_serving_softirq() to kconv.h results in
compile failure on PREEMPT_RT because it requires
task_struct::softirq_disable_cnt. This is not available if kconv.h is
included from sched.h.

It is not needed to include kconv.h from sched.h. All but the net/ user
already include the kconv header file.

Move the include of the kconv.h header from sched.h it its users.
Additionally include sched.h from kconv.h to ensure that everything
task_struct related is available.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Link: https://lkml.kernel.org/r/20210218173124.iy5iyqv3a4oia4vv@linutronix.de

authored by

Sebastian Andrzej Siewior and committed by
Ingo Molnar
183f47fc e140749c

+5 -1
+1
drivers/usb/usbip/usbip_common.h
··· 18 18 #include <linux/usb.h> 19 19 #include <linux/wait.h> 20 20 #include <linux/sched/task.h> 21 + #include <linux/kcov.h> 21 22 #include <uapi/linux/usbip.h> 22 23 23 24 #undef pr_fmt
+1
include/linux/kcov.h
··· 2 2 #ifndef _LINUX_KCOV_H 3 3 #define _LINUX_KCOV_H 4 4 5 + #include <linux/sched.h> 5 6 #include <uapi/linux/kcov.h> 6 7 7 8 struct task_struct;
-1
include/linux/sched.h
··· 14 14 #include <linux/pid.h> 15 15 #include <linux/sem.h> 16 16 #include <linux/shm.h> 17 - #include <linux/kcov.h> 18 17 #include <linux/mutex.h> 19 18 #include <linux/plist.h> 20 19 #include <linux/hrtimer.h>
+1
net/core/skbuff.c
··· 60 60 #include <linux/prefetch.h> 61 61 #include <linux/if_vlan.h> 62 62 #include <linux/mpls.h> 63 + #include <linux/kcov.h> 63 64 64 65 #include <net/protocol.h> 65 66 #include <net/dst.h>
+1
net/mac80211/iface.c
··· 15 15 #include <linux/if_arp.h> 16 16 #include <linux/netdevice.h> 17 17 #include <linux/rtnetlink.h> 18 + #include <linux/kcov.h> 18 19 #include <net/mac80211.h> 19 20 #include <net/ieee80211_radiotap.h> 20 21 #include "ieee80211_i.h"
+1
net/mac80211/rx.c
··· 17 17 #include <linux/etherdevice.h> 18 18 #include <linux/rcupdate.h> 19 19 #include <linux/export.h> 20 + #include <linux/kcov.h> 20 21 #include <linux/bitops.h> 21 22 #include <net/mac80211.h> 22 23 #include <net/ieee80211_radiotap.h>