Thread (6 messages) 6 messages, 2 authors, 2005-11-05

Re: [PATCH] kill 8139too kernel thread (sorta)

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2005-11-05 04:20:20
Also in: lkml

On Fri, Nov 04, 2005 at 10:47:19PM -0500, Jeff Garzik wrote:
Here's a better version, that uses cancel_rearming_...
Yep it certainly solves the race condition.
+	if (rtnl_shlock_nowait() == 0) {
 		rtl8139_thread_iter (dev, tp, tp->mmio_addr);
 		rtnl_unlock ();
 	}
 
-	complete_and_exit (&tp->thr_exited, 0);
+	schedule_delayed_work(&tp->thread, next_tick);
My only concern is the potential for starvation here should we fail
to obtain the RTNL.  Since any local user can hold the RTNL by issuing
rtnetlink requests, it is theoretically possible for the rtl8139 work
to be delayed indefinitely.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help