lkml.org 
[lkml]   [2001]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: 8139too termination
From
> 
> tp->diediedie = 1;
> wmb();
> ret = kill_proc(...);
>
> and test the flag in rtl8139_thread().
>

i had something like that in mind.

> The tricky part is teaching the thread to ignore the
> spurious signals - the signal_pending() state needs to be
> cleared. I think flush_signals() is the way to do this.
> See context_thread() for an example.
>
> spin_lock_irq(&curtask->sigmask_lock);
> flush_signals(curtask);
> recalc_sigpending(curtask);
> spin_unlock_irq(&curtask->sigmask_lock);
>
> The recalc_sigpending() here appears to be unnecessary...
>

what about changing doing
spin_lock_irq(&current->sigmask_lock);
sigfillset(&current->blocked); /* block all sig's */
recalc_sigpending(current);
spin_unlock_irq(&current->sigmask_lock);

instead of

spin_lock_irq(&current->sigmask_lock);
sigemptyset(&current->blocked);
recalc_sigpending(current);
spin_unlock_irq(&current->sigmask_lock);

and replacing the signal_pending() stuff in the loops of
rtl8139_thread() with checks for tp->diediedie?


-
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.049 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site