From 1290f52b1008b26369909c1c642843bdc231a64c Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 26 Oct 2003 16:35:23 -0800 Subject: [PATCH] Put the compiler barrier() on the right side of the preemption enable on UP-PREEMPT. Without this, the enable could "migrate" up into the critical region (on SMP, the actual spinlock would act as an additional barrier and PREEMPT was ok). --- include/linux/preempt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 1b227b3c8ccbd..0bd40fb2048f3 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -32,8 +32,8 @@ do { \ #define preempt_enable_no_resched() \ do { \ - dec_preempt_count(); \ barrier(); \ + dec_preempt_count(); \ } while (0) #define preempt_check_resched() \ -- 2.53.0