Commit 4754b3f4 authored by Philippe Gerum's avatar Philippe Gerum

x86: ipipe: restrict WARN_ON_IN_IRQ() to the root domain

We have no way to figure out the current context unless the root
domain is active. Make sure we won't trigger false positives with
WARN_ON_IN_IRQ() which may be invoked through calls to access_ok()
from the head domain.
parent c6da3d18
......@@ -7,6 +7,7 @@
#include <linux/compiler.h>
#include <linux/kasan-checks.h>
#include <linux/string.h>
#include <linux/ipipe.h>
#include <asm/asm.h>
#include <asm/page.h>
#include <asm/smap.h>
......@@ -70,7 +71,7 @@ static inline bool __chk_range_not_ok(unsigned long addr, unsigned long size, un
})
#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
# define WARN_ON_IN_IRQ() WARN_ON_ONCE(!in_task())
# define WARN_ON_IN_IRQ() WARN_ON_ONCE(ipipe_root_p && !in_task())
#else
# define WARN_ON_IN_IRQ()
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment