[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <152261522745.30503.11022506204837457606.stgit@warthog.procyon.org.uk>
Date: Sun, 01 Apr 2018 21:40:27 +0100
From: David Howells <dhowells@...hat.com>
To: linux-kernel@...r.kernel.org
Subject: [PATCH 02/45] Fix exception_enter() return value
Fix the return value of exception_enter() to return CONTEXT_KERNEL rather
than 0 when the facility is disabled as the function returns an ctx_state
enum rather than a plain integer.
Signed-off-by: David Howells <dhowells@...hat.com>
---
include/linux/context_tracking.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h
index d05609ad329d..b4e9f9d80745 100644
--- a/include/linux/context_tracking.h
+++ b/include/linux/context_tracking.h
@@ -50,7 +50,7 @@ static inline enum ctx_state exception_enter(void)
enum ctx_state prev_ctx;
if (!context_tracking_is_enabled())
- return 0;
+ return CONTEXT_KERNEL;
prev_ctx = this_cpu_read(context_tracking.state);
if (prev_ctx != CONTEXT_KERNEL)
@@ -85,7 +85,7 @@ static inline void user_enter(void) { }
static inline void user_exit(void) { }
static inline void user_enter_irqoff(void) { }
static inline void user_exit_irqoff(void) { }
-static inline enum ctx_state exception_enter(void) { return 0; }
+static inline enum ctx_state exception_enter(void) { return CONTEXT_KERNEL; }
static inline void exception_exit(enum ctx_state prev_ctx) { }
static inline enum ctx_state ct_state(void) { return CONTEXT_DISABLED; }
#endif /* !CONFIG_CONTEXT_TRACKING */
Powered by blists - more mailing lists