netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: davem@davemloft.net, jgarzik@pobox.com
Cc: netdev@oss.sgi.com
Subject: [PATCH 2/2] use rtnl_lock_interruptible in 8139 to avoid shutdown hang
Date: Sun, 9 Jan 2005 13:16:30 +0100	[thread overview]
Message-ID: <20050109121630.GB19599@lst.de> (raw)

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 ();
 	}

             reply	other threads:[~2005-01-09 12:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-09 12:16 Christoph Hellwig [this message]
2005-01-10 21:37 ` [PATCH 2/2] use rtnl_lock_interruptible in 8139 to avoid shutdown hang David S. Miller
2005-01-10 21:45   ` Christoph Hellwig
2005-01-11  1:50     ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050109121630.GB19599@lst.de \
    --to=hch@lst.de \
    --cc=davem@davemloft.net \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).