summaryrefslogtreecommitdiff
path: root/kernel
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 /kernel
parent92ae63c07b8fba40f960c7286403bbdc90e46655 (diff)
parenta381b70a1cf88e4a2d54f24d59abdcad0ff2dfe6 (diff)
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 'kernel')
-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