From: Robert Kuebel <kuebelr@email.uc.edu>
To: torvalds@transmeta.com, alan@lxorguk.ukuu.org.uk
Cc: akpm@zip.com.au, linux-kernel@vger.kernel.org
Subject: [PATCH] 8139too thread termination
Date: Mon, 29 Oct 2001 23:25:08 -0500 [thread overview]
Message-ID: <20011029232508.A305@cartman> (raw)
this patch stops the 8139too kernel thread from dying on any signal.
now, it will only terminate when the driver is closed.
the patch is agains 2.4.13.
thanks.
rob.
--- drivers/net/8139too.orig.c Mon Oct 29 22:59:15 2001
+++ drivers/net/8139too.c Mon Oct 29 23:07:32 2001
@@ -80,6 +80,8 @@
Kalle Olavi Niemitalo - Wake-on-LAN ioctls
+ Robert Kuebel - Save kernel thread from dying on any signal.
+
Submitting bug reports:
"rtl8139-diag -mmmaaavvveefN" output
@@ -616,6 +618,7 @@
struct completion thr_exited;
u32 rx_config;
struct rtl_extra_stats xstats;
+ int time_to_die;
};
MODULE_AUTHOR ("Jeff Garzik <jgarzik@mandrakesoft.com>");
@@ -1669,7 +1672,13 @@
timeout = interruptible_sleep_on_timeout (&tp->thr_wait, timeout);
} while (!signal_pending (current) && (timeout > 0));
- if (signal_pending (current))
+ if (signal_pending (current)) {
+ spin_lock_irq(¤t->sigmask_lock);
+ flush_signals(current);
+ spin_unlock_irq(¤t->sigmask_lock);
+ }
+
+ if (tp->time_to_die)
break;
rtnl_lock ();
@@ -2200,6 +2209,8 @@
netif_stop_queue (dev);
if (tp->thr_pid >= 0) {
+ tp->time_to_die = 1;
+ wmb();
ret = kill_proc (tp->thr_pid, SIGTERM, 1);
if (ret) {
printk (KERN_ERR "%s: unable to signal thread\n", dev->name);
next reply other threads:[~2001-10-30 4:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-30 4:25 Robert Kuebel [this message]
2001-10-31 0:11 ` [PATCH] 8139too thread termination Robert Kuebel
2001-10-31 0:17 ` Andrew Morton
2001-10-31 0:18 ` Jeff Garzik
2001-10-31 0:30 ` Robert Kuebel
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=20011029232508.A305@cartman \
--to=kuebelr@email.uc.edu \
--cc=akpm@zip.com.au \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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