aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-02-21 17:12:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-02-21 17:12:18 -0800
commit177626c6d5ab1f73d41c94bf9fb0071149779bff (patch)
treec620e6efef42ae5dadd161a5768e6b61e7b31d8a
parentMerge tag 'Smack-for-v5.12' of git://github.com/cschaufler/smack-next (diff)
parentseccomp: Improve performace by optimizing rmb() (diff)
downloadwireguard-linux-177626c6d5ab1f73d41c94bf9fb0071149779bff.tar.xz
wireguard-linux-177626c6d5ab1f73d41c94bf9fb0071149779bff.zip
Merge tag 'seccomp-v5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull seccomp updates from Kees Cook: "Two small seccomp updates. This contains a fix for a build failure that went unnoticed for many years, and a memory barrier correction: - Fix a non-FILTER build failure for some architectures (Paul Cercueil) - Improve performance with correct memory barrier (wanghongzhe)" * tag 'seccomp-v5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: Improve performace by optimizing rmb() seccomp: Add missing return in non-void function
Diffstat (limited to '')
-rw-r--r--kernel/seccomp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 952dc1c90229..1d60fc2c9987 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -1164,7 +1164,7 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
* Make sure that any changes to mode from another thread have
* been seen after SYSCALL_WORK_SECCOMP was seen.
*/
- rmb();
+ smp_rmb();
if (!sd) {
populate_seccomp_data(&sd_local);
@@ -1284,6 +1284,8 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
const bool recheck_after_trace)
{
BUG();
+
+ return -1;
}
#endif