summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorWill Drewry <wad@chromium.org>2012-07-14 17:32:52 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-14 21:01:36 +0200
commit09d314425f5bc69fcf793c7890d9e6a3cdcb44be (patch)
tree12bc24fa339e0876a2cbf783ed98634ea05ca66d /arch/x86
parentMerge tag 'cpufreq-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-09d314425f5bc69fcf793c7890d9e6a3cdcb44be.tar.xz
linux-09d314425f5bc69fcf793c7890d9e6a3cdcb44be.zip
vsyscall_64: add missing ifdef CONFIG_SECCOMP
vsyscall_seccomp introduced a dependency on __secure_computing. On configurations with CONFIG_SECCOMP disabled, compilation will fail. Reported-by: feng xiangjun <fengxj325@gmail.com> Signed-off-by: Will Drewry <wad@chromium.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/vsyscall_64.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
index 08a18d0dcc5a..5db36caf4289 100644
--- a/arch/x86/kernel/vsyscall_64.c
+++ b/arch/x86/kernel/vsyscall_64.c
@@ -139,6 +139,7 @@ static int addr_to_vsyscall_nr(unsigned long addr)
return nr;
}
+#ifdef CONFIG_SECCOMP
static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr)
{
if (!seccomp_mode(&tsk->seccomp))
@@ -147,6 +148,9 @@ static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr)
task_pt_regs(tsk)->ax = syscall_nr;
return __secure_computing(syscall_nr);
}
+#else
+#define vsyscall_seccomp(_tsk, _nr) 0
+#endif
static bool write_ok_or_segv(unsigned long ptr, size_t size)
{