lkml.org 
[lkml]   [2018]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 02/45] Fix exception_enter() return value
From
Date
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@redhat.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 */
\
 
 \ /
  Last update: 2018-04-01 22:40    [W:0.100 / U:5.304 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site