linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Missing memory barrier on net/core/dev.c
@ 2003-09-09 17:58 Felipe W Damasio
  2003-09-09 19:46 ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe W Damasio @ 2003-09-09 17:58 UTC (permalink / raw)
  To: davem; +Cc: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

	Hi Dave,

	I *think* net/core/dev.c is missing a mb() before calling 
schedule_timoeut.

	Feel free to prove me wrong, though ;)

	Patch against 2.6.0-test5.

	Please review.

	Cheers,

Felipe

[-- Attachment #2: net-core-current_state.patch --]
[-- Type: text/plain, Size: 475 bytes --]

--- linux-2.6.0-test5/net/core/dev.c	Mon Sep  8 16:50:06 2003
+++ linux-2.6.0-test5-fwd/net/core/dev.c	Tue Sep  9 14:52:48 2003
@@ -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: "

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Missing memory barrier on net/core/dev.c
  2003-09-09 17:58 [PATCH] Missing memory barrier on net/core/dev.c Felipe W Damasio
@ 2003-09-09 19:46 ` David S. Miller
  2003-09-09 20:21   ` Felipe W Damasio
  0 siblings, 1 reply; 3+ messages in thread
From: David S. Miller @ 2003-09-09 19:46 UTC (permalink / raw)
  To: Felipe W Damasio; +Cc: linux-kernel

On Tue, 09 Sep 2003 14:58:47 -0300
Felipe W Damasio <felipewd@terra.com.br> wrote:

> 	I *think* net/core/dev.c is missing a mb() before calling 
> schedule_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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Missing memory barrier on net/core/dev.c
  2003-09-09 19:46 ` David S. Miller
@ 2003-09-09 20:21   ` Felipe W Damasio
  0 siblings, 0 replies; 3+ messages in thread
From: Felipe W Damasio @ 2003-09-09 20:21 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel

	Hi,

David S. Miller wrote:
> On Tue, 09 Sep 2003 14:58:47 -0300
> Felipe W Damasio <felipewd@terra.com.br> wrote:
> 
> 
>>	I *think* net/core/dev.c is missing a mb() before calling 
>>schedule_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.

	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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-09 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-09 17:58 [PATCH] Missing memory barrier on net/core/dev.c Felipe W Damasio
2003-09-09 19:46 ` David S. Miller
2003-09-09 20:21   ` Felipe W Damasio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).