All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: "Philippe Veillette (LMC)" <Philippe.Veillette@ericsson.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: sk->socket is invalid in tcp stack
Date: 12 Jun 2002 01:38:51 +0200	[thread overview]
Message-ID: <m3it4p5qt0.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <7B2A7784F4B7F0409947481F3F3FEF8303A070D4@eammlnt051.lmc.ericsson.se>

"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

  reply	other threads:[~2002-06-11 23:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-11 19:15 sk->socket is invalid in tcp stack Philippe Veillette (LMC)
2002-06-11 23:38 ` Andi Kleen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-12 12:38 Philippe Veillette (LMC)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3it4p5qt0.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=Philippe.Veillette@ericsson.ca \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.