netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] use rtnl_lock_interruptible in 8139 to avoid shutdown hang
@ 2005-01-09 12:16 Christoph Hellwig
  2005-01-10 21:37 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2005-01-09 12:16 UTC (permalink / raw)
  To: davem, jgarzik; +Cc: netdev

The 8139too thread needs to use rtnl_lock_interruptible so it can avoid
doing the actual work once it's been kill_proc()ed on module removal
time.

Based on debugging and an earlier patch that adds a driver-private
semaphore from Herbert Xu.

--- 1.101/drivers/net/8139too.c	2004-10-30 02:00:00 +02:00
+++ edited/drivers/net/8139too.c	2005-01-09 12:55:31 +01:00
@@ -1636,7 +1636,8 @@
 		if (tp->time_to_die)
 			break;
 
-		rtnl_lock ();
+		if (rtnl_lock_interruptible ())
+			break;
 		rtl8139_thread_iter (dev, tp, tp->mmio_addr);
 		rtnl_unlock ();
 	}

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

end of thread, other threads:[~2005-01-11  1:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-09 12:16 [PATCH 2/2] use rtnl_lock_interruptible in 8139 to avoid shutdown hang Christoph Hellwig
2005-01-10 21:37 ` David S. Miller
2005-01-10 21:45   ` Christoph Hellwig
2005-01-11  1:50     ` David S. Miller

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).