lkml.org 
[lkml]   [2002]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sk->socket is invalid in tcp stack
From
Date
"Philippe Veillette (LMC)" <Philippe.Veillette@ericsson.ca> writes:

> I've found what could be a problem in the tcp stack with linux-2.4.17 &
> 2.4.18. When i run lmbench-2.0-patch2 and that i add the following line of
> code in tcp_v4_rcv, it<s get added between the if (!ipsec_sk_policy(sk,skb))
> ... and if (sk->state == TCP_TIME_WAIT)
>
> if (sk->socket) {
> if (sk->socket->inode) {
> printk("Boum\n");
> }
> }
>
> I get a crash, i can give the dump later but for now, I am just wondering if
> the sk->socket could be invalid when we are receiving a tcp packet. Since

It likely did receive to a time-wait socket. time-wait buckets are
"inherited" by hand from struct sock and live in similar hash tables,
but only some fields at the beginning are valid. Yes, it's rather ugly, but ...

-Andi
-
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:26    [W:0.028 / U:1.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site