summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2017-03-12 08:17:10 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-12 08:17:10 +0000
commitcd5e303ecd1b4d803f35c01633c6eb46457e7520 (patch)
treec823fdde0a8451d7894e8db40990a5408a82849c /kernel
parentfbf3cf0c8300dcaf4ac03815ef6330367d15e25b (diff)
parentc0ef1f537a9728a91475f8f73cf8b5764e7a9848 (diff)
Fix: Disable sys_membarrier when nohz_full is enabled
am: c0ef1f537a Change-Id: I3650becd64c5156d24dee601990d48c68057e81d
Diffstat (limited to 'kernel')
-rw-r--r--kernel/membarrier.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/membarrier.c b/kernel/membarrier.c
index 536c727a56e9..9f9284f37f8d 100644
--- a/kernel/membarrier.c
+++ b/kernel/membarrier.c
@@ -16,6 +16,7 @@
#include <linux/syscalls.h>
#include <linux/membarrier.h>
+#include <linux/tick.h>
/*
* Bitmask made from a "or" of all commands within enum membarrier_cmd,
@@ -51,6 +52,9 @@
*/
SYSCALL_DEFINE2(membarrier, int, cmd, int, flags)
{
+ /* MEMBARRIER_CMD_SHARED is not compatible with nohz_full. */
+ if (tick_nohz_full_enabled())
+ return -ENOSYS;
if (unlikely(flags))
return -EINVAL;
switch (cmd) {