diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-08 00:06:52 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-08 00:06:52 +0100 |
commit | bc351f07260533cc1b3987339551decd00ddd52e (patch) | |
tree | 3b6f396681f08dacc8dd24ce2c586ea2195e825d /kernel/seccomp.c | |
parent | KVM: SVM: fix 32-bit compilation (diff) | |
parent | KVM: x86/mmu: Optimize not-present/MMIO SPTE check in get_mmio_spte() (diff) | |
download | linux-bc351f07260533cc1b3987339551decd00ddd52e.tar.xz linux-bc351f07260533cc1b3987339551decd00ddd52e.zip |
Merge branch 'kvm-master' into kvm-next
Fixes to get_mmio_spte, destined to 5.10 stable branch.
Diffstat (limited to 'kernel/seccomp.c')
-rw-r--r-- | kernel/seccomp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 8ad7a293255a..53a7d1512dd7 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -38,7 +38,7 @@ #include <linux/filter.h> #include <linux/pid.h> #include <linux/ptrace.h> -#include <linux/security.h> +#include <linux/capability.h> #include <linux/tracehook.h> #include <linux/uaccess.h> #include <linux/anon_inodes.h> @@ -558,8 +558,7 @@ static struct seccomp_filter *seccomp_prepare_filter(struct sock_fprog *fprog) * behavior of privileged children. */ if (!task_no_new_privs(current) && - security_capable(current_cred(), current_user_ns(), - CAP_SYS_ADMIN, CAP_OPT_NOAUDIT) != 0) + !ns_capable_noaudit(current_user_ns(), CAP_SYS_ADMIN)) return ERR_PTR(-EACCES); /* Allocate a new seccomp_filter */ |