sk->socket is invalid in tcp stack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux