Re: 8139too termination

Robert Kuebel (kuebelr@email.uc.edu)
Mon, 29 Oct 2001 19:08:17 -0500


>
> 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/