Fix: Disable sys_membarrier when nohz_full is enabled

am: 3de5a92847

Change-Id: Ib7d8806d40c785e0128af2d846bda76727aa1255
This commit is contained in:
Mathieu Desnoyers
2017-03-12 08:20:39 +00:00
committed by android-build-merger

View File

@@ -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) {