diff options
Diffstat (limited to 'kernel/context_tracking.c')
-rw-r--r-- | kernel/context_tracking.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 54f471e536dc..9002e92e6372 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c | |||
@@ -30,8 +30,9 @@ void user_enter(void) | |||
30 | local_irq_save(flags); | 30 | local_irq_save(flags); |
31 | if (__this_cpu_read(context_tracking.active) && | 31 | if (__this_cpu_read(context_tracking.active) && |
32 | __this_cpu_read(context_tracking.state) != IN_USER) { | 32 | __this_cpu_read(context_tracking.state) != IN_USER) { |
33 | __this_cpu_write(context_tracking.state, IN_USER); | 33 | vtime_user_enter(current); |
34 | rcu_user_enter(); | 34 | rcu_user_enter(); |
35 | __this_cpu_write(context_tracking.state, IN_USER); | ||
35 | } | 36 | } |
36 | local_irq_restore(flags); | 37 | local_irq_restore(flags); |
37 | } | 38 | } |
@@ -53,8 +54,9 @@ void user_exit(void) | |||
53 | 54 | ||
54 | local_irq_save(flags); | 55 | local_irq_save(flags); |
55 | if (__this_cpu_read(context_tracking.state) == IN_USER) { | 56 | if (__this_cpu_read(context_tracking.state) == IN_USER) { |
56 | __this_cpu_write(context_tracking.state, IN_KERNEL); | ||
57 | rcu_user_exit(); | 57 | rcu_user_exit(); |
58 | vtime_user_exit(current); | ||
59 | __this_cpu_write(context_tracking.state, IN_KERNEL); | ||
58 | } | 60 | } |
59 | local_irq_restore(flags); | 61 | local_irq_restore(flags); |
60 | } | 62 | } |