Missing memory barrier on net/core/dev.c
PATCH 1/1 Missing memory barrier on net/core/dev.c
Hi Dave,
I *think* net/core/dev.c is missing a mb() before callingschedule_timoeut.
Feel free to prove me wrong, though ;) Patch against 2.6.0-test5. Please review. Cheers,
Felipe
net/core/dev.c +2 -2
@@ -2753,9 +2753,9 @@ rebroadcast_time = jiffies; } - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (HZ /4 ); - current->state =TASK_RUNNING ; +__set_current_state (TASK_RUNNING );if (time_after (jiffies, warning_time +10 *HZ )) { printk(KERN_EMERG "unregister_netdevice: "
Quoted 2 lines · On Tue, 09 Sep 2003 14:58:47 -0300 Felipe W Damasio <[email protected]>…
I *think*
net/core/dev.cis missing amb()before callingschedule_timoeut.
I have another patch in my queue from Andrew Morton that removes the TASK_RUNNING setting altogether, schedule_timeout() always returns with the task in that state.
Hi,
Quoted 10 lines · David S. Miller
Quoted 2 lines · On Tue, 09 Sep 2003 14:58:47 -0300 Felipe W Damasio <[email protected]>…
I *think*
net/core/dev.cis missing amb()before callingschedule_timoeut.I have another patch in my queue from Andrew Morton that removes the
TASK_RUNNINGsetting altogether,schedule_timeout()always returns with the task in that state.
Ok, although that was not the main point of the patch :)
What about the "set_current_state" before calling schedule_timeout.
Isn't that mb() needed?
Cheers,
Felipe