Commit-ID: 931ba3c663e1e2f764d5f83fdbd32f5c559ab5e2 Gitweb: http://git.kernel.org/tip/931ba3c663e1e2f764d5f83fdbd32f5c559ab5e2 Author: Ingo Molnar <mingo@xxxxxxxxxx> AuthorDate: Wed, 8 Mar 2017 09:42:52 +0100 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitDate: Thu, 9 Mar 2017 13:00:49 +0100 sched/wait: Add <linux/sched/signal.h> dependency for now The wait_event_interruptible*() APIs are using signal_pending(), so include its header to not build-break users of those APIs. Note that this is overkill as most wait_event*() users don't care about signals - but solving that problem turned out to be more complex. Note two dependency quirks: - the <linux/sched/signal.h> include line needs to be last in wait.h, because that header itself depends on wait-queue types. - we shouldn't include cred.h from sched/signal.h, because cred.h is a complex header that will create a circular dependency if we do so. Instead we include wait.h to gain the waitqueue types, plus we predeclare 'struct cred' for a function prototype. Note that the cred.h change has some knock-on effects. Reported-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: linux-kernel@xxxxxxxxxxxxxxx Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> --- arch/alpha/kernel/asm-offsets.c | 2 ++ include/linux/audit.h | 2 ++ include/linux/fs.h | 1 + include/linux/sched/signal.h | 8 +++++--- include/linux/wait.h | 3 +++ kernel/tsacct.c | 1 + 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/alpha/kernel/asm-offsets.c b/arch/alpha/kernel/asm-offsets.c index 6ff8886..3576325 100644 --- a/arch/alpha/kernel/asm-offsets.c +++ b/arch/alpha/kernel/asm-offsets.c @@ -9,6 +9,8 @@ #include <linux/sched.h> #include <linux/ptrace.h> #include <linux/kbuild.h> +#include <linux/cred.h> + #include <asm/io.h> void foo(void) diff --git a/include/linux/audit.h b/include/linux/audit.h index 504e784..57b3d6c 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -25,6 +25,8 @@ #include <linux/sched.h> #include <linux/ptrace.h> +#include <linux/cred.h> + #include <uapi/linux/audit.h> #define AUDIT_INO_UNSET ((unsigned long)-1) diff --git a/include/linux/fs.h b/include/linux/fs.h index aad3fd0..bf51dc2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3,6 +3,7 @@ #include <linux/linkage.h> #include <linux/wait.h> +#include <linux/cred.h> #include <linux/kdev_t.h> #include <linux/dcache.h> #include <linux/path.h> diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 2cf4467..0a5abc3 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -6,7 +6,7 @@ #include <linux/sched.h> #include <linux/sched/jobctl.h> #include <linux/sched/task.h> -#include <linux/cred.h> +#include <linux/wait.h> /* * Types defining task->signal and task->sighand and APIs using them: @@ -289,8 +289,10 @@ extern int force_sigsegv(int, struct task_struct *); extern int force_sig_info(int, struct siginfo *, struct task_struct *); extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); -extern int kill_pid_info_as_cred(int, struct siginfo *, struct pid *, - const struct cred *, u32); + +struct cred; +extern int kill_pid_info_as_cred(int, struct siginfo *, struct pid *, const struct cred *, u32); + extern int kill_pgrp(struct pid *pid, int sig, int priv); extern int kill_pid(struct pid *pid, int sig, int priv); extern int kill_proc_info(int, struct siginfo *, pid_t); diff --git a/include/linux/wait.h b/include/linux/wait.h index db076ca..b8f46e1 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -1213,4 +1213,7 @@ int wait_on_atomic_t(atomic_t *val, int (*action)(atomic_t *), unsigned mode) return out_of_line_wait_on_atomic_t(val, action, mode); } +/* NOTE: this is temporary, and it needs to come last, due to type dependencies: */ +#include <linux/sched/signal.h> + #endif /* _LINUX_WAIT_H */ diff --git a/kernel/tsacct.c b/kernel/tsacct.c index 370724b..63834bd 100644 --- a/kernel/tsacct.c +++ b/kernel/tsacct.c @@ -23,6 +23,7 @@ #include <linux/tsacct_kern.h> #include <linux/acct.h> #include <linux/jiffies.h> +#include <linux/cred.h> #include <linux/mm.h> /* -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |