lkml.org 
[lkml]   [2001]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] 8139too thread termination
From
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(&current->sigmask_lock);
+ flush_signals(current);
+ spin_unlock_irq(&current->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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.044 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site