summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2021-02-18 20:31:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-17 12:48:07 +0300
commite7eb0737c6d874caf0ddea22cf4e3b22eef7ae99 (patch)
tree859bb4b331742dc0f5967fa5ffaac590ce3764ec
parentf085e02f0a32f6dfcfabc6535c9c4a1707cef86b (diff)
downloadlinux-e7eb0737c6d874caf0ddea22cf4e3b22eef7ae99.tar.xz
kcov: Remove kcov include from sched.h and move it to its users.
[ Upstream commit 183f47fcaa54a5ffe671d990186d330ac8c63b10 ] 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 Stable-dep-of: 19e35f24750d ("nfc: nci: Fix kcov check in nci_rx_work()") Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/usb/usbip/usbip_common.h1
-rw-r--r--include/linux/kcov.h1
-rw-r--r--include/linux/sched.h1
-rw-r--r--net/core/skbuff.c1
-rw-r--r--net/mac80211/iface.c1
-rw-r--r--net/mac80211/rx.c1
6 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/usbip/usbip_common.h b/drivers/usb/usbip/usbip_common.h
index a7e6ce96f62c..02cd91cb3f83 100644
--- a/drivers/usb/usbip/usbip_common.h
+++ b/drivers/usb/usbip/usbip_common.h
@@ -18,6 +18,7 @@
#include <linux/usb.h>
#include <linux/wait.h>
#include <linux/sched/task.h>
+#include <linux/kcov.h>
#include <uapi/linux/usbip.h>
#undef pr_fmt
diff --git a/include/linux/kcov.h b/include/linux/kcov.h
index a10e84707d82..b48128b717f1 100644
--- a/include/linux/kcov.h
+++ b/include/linux/kcov.h
@@ -2,6 +2,7 @@
#ifndef _LINUX_KCOV_H
#define _LINUX_KCOV_H
+#include <linux/sched.h>
#include <uapi/linux/kcov.h>
struct task_struct;
diff --git a/include/linux/sched.h b/include/linux/sched.h
index aa015416c569..3613c3f43b83 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -14,7 +14,6 @@
#include <linux/pid.h>
#include <linux/sem.h>
#include <linux/shm.h>
-#include <linux/kcov.h>
#include <linux/mutex.h>
#include <linux/plist.h>
#include <linux/hrtimer.h>
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index fd53b66f2ca1..b0c2d6f01800 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -60,6 +60,7 @@
#include <linux/prefetch.h>
#include <linux/if_vlan.h>
#include <linux/mpls.h>
+#include <linux/kcov.h>
#include <net/protocol.h>
#include <net/dst.h>
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 3a15ef8dd322..06ce138eedf1 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -15,6 +15,7 @@
#include <linux/if_arp.h>
#include <linux/netdevice.h>
#include <linux/rtnetlink.h>
+#include <linux/kcov.h>
#include <net/mac80211.h>
#include <net/ieee80211_radiotap.h>
#include "ieee80211_i.h"
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 97a63b940482..65fea564c9c0 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -17,6 +17,7 @@
#include <linux/etherdevice.h>
#include <linux/rcupdate.h>
#include <linux/export.h>
+#include <linux/kcov.h>
#include <linux/bitops.h>
#include <net/mac80211.h>
#include <net/ieee80211_radiotap.h>