* sk->socket is invalid in tcp stack
@ 2002-06-11 19:15 Philippe Veillette (LMC)
2002-06-11 23:38 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Veillette (LMC) @ 2002-06-11 19:15 UTC (permalink / raw)
To: 'linux-kernel@vger.kernel.org',
'linux-net@vger.kernel.org'
Hi everybody
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
from the search i've done it seems to be initialized only when the sock
struct is initialized in sock_init_data that get called by inet_create.
But what is more frightening, is that it's alright for sometime and then
Boum, crash....
Bye
Philippe Veillette
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: sk->socket is invalid in tcp stack
2002-06-11 19:15 sk->socket is invalid in tcp stack Philippe Veillette (LMC)
@ 2002-06-11 23:38 ` Andi Kleen
0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2002-06-11 23:38 UTC (permalink / raw)
To: Philippe Veillette (LMC); +Cc: linux-kernel
"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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: sk->socket is invalid in tcp stack
@ 2002-06-12 12:38 Philippe Veillette (LMC)
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Veillette (LMC) @ 2002-06-12 12:38 UTC (permalink / raw)
To: 'Andi Kleen'; +Cc: linux-kernel
> 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
>
Thanks,
That's what I have found after, the sock is in a time wait state,
guess i will have to add a check...
Phil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-06-12 12:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-11 19:15 sk->socket is invalid in tcp stack Philippe Veillette (LMC)
2002-06-11 23:38 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2002-06-12 12:38 Philippe Veillette (LMC)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox