summaryrefslogtreecommitdiffstats
path: root/kernel/include/asm-generic/preempt.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/asm-generic/preempt.h')
-rw-r--r--kernel/include/asm-generic/preempt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/include/asm-generic/preempt.h b/kernel/include/asm-generic/preempt.h
index 5d8ffa3e6..c1cde3577 100644
--- a/kernel/include/asm-generic/preempt.h
+++ b/kernel/include/asm-generic/preempt.h
@@ -7,10 +7,10 @@
static __always_inline int preempt_count(void)
{
- return current_thread_info()->preempt_count;
+ return READ_ONCE(current_thread_info()->preempt_count);
}
-static __always_inline int *preempt_count_ptr(void)
+static __always_inline volatile int *preempt_count_ptr(void)
{
return &current_thread_info()->preempt_count;
}