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:

2483         /*  Queue data for delivery to the user.
2484          *  Packets in sequence go to the receive queue.
2485          *  Out of sequence packets to the out_of_order_queue.
2486          */
2487         if (TCP_SKB_CB(skb)->seq == tp->rcv_nxt) {
2488                 /* Ok. In sequence. */
2489 ****            if (tp->ucopy.task == current &&
2490                     tp->copied_seq == tp->rcv_nxt &&
2491                     tp->ucopy.len &&
2492                     sk->lock.users &&
2493                     !tp->urg_data) {
2494                         int chunk = min(skb->len, tp->ucopy.len);
2495 
2496 ****                    __set_current_state(TASK_RUNNING);

Hmmm...  I think I like the idea of having a different current for
interrupt context code.  It looks like it's either that, slowing
down get_current() by checking for interrupt or kernel stack, or
devoting a register to current.

Must sleep on this...

Later,
Kenn


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to