Re: Calling current() from interrupt context

From: Andi Kleen (ak@suse.de)
Date: Sun Oct 08 2000 - 20:54:21 EST


On Mon, Oct 09, 2000 at 02:45:54AM +0100, Kenn Humborg wrote:
> On Mon, Oct 09, 2000 at 02:21:09AM +0100, Kenn Humborg wrote:
> > On Mon, Oct 09, 2000 at 02:20:27AM +0200, Andi Kleen wrote:
> > > 2.4 TCP code relies on current being valid in a softirq.
> >
> > And what the hell does TCP need current for anyway?
>
> I think the only reference is in tcp_input.c, tcp_data_queue().
> This does:

[...]

It is actually used in two places, in the fast path and there. It isn't
as bad as it looks because it is only used in user context and could
be fixed by putting a special flag into the sock for the execute
in user context case (or just supply an argument that is passed around)

The point was just that there are probably other users of current
in interrupt context and AFAIK it works currently in all ports
so you would need to fix these (mostly buggy) occurrences.

If you ever wanted to do a SMP VAX port you would also need to fix
smp_processor_id().

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:11 EST