Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / include / asm-generic / preempt.h
index 5d8ffa3..c1cde35 100644 (file)
@@ -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;
 }