From: "Chad N. Tindel" <chad@tindel.net>
To: Nagendra Singh Tomar <nagendra_tomar@adaptec.com>
Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org
Subject: Re: udp_recvmsg: possible bug causing infinite hang?
Date: Tue, 12 Oct 2004 01:32:33 -0400 [thread overview]
Message-ID: <20041012053233.GB62811@calma.pair.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0410121052390.29592-100000@localhost.localdomain>
> Does the POSIX standard _not_ give this implicit guarantee ? Whats the
> point in having a select call that says that the fd is readable, and when
> I go to read it the blocking read call blocks. Then either select returned
> a wrong positive or the read is buggy.
> The kernel should mark the socket readable (and hence select returns
> "readable") only after it has added the incoming data to the socket receive
> queue or it has changed the state of the socket (in case of TCP connections
> getting closed), in case of peer closing the connection.
> After that has been done, is the guarantee not there ?
What you're saying is correct. However, if the UDP handler pulls the data
off of the receive queue and then finds that the datagram is corrupted, it
will go back into the read function to wait for another datagram. Personally
I think that it should return some other kind of error (not EAGAIN) to indicate
somehow that we discarded a datagram due to a bad checksum.
Chad
next prev parent reply other threads:[~2004-10-12 5:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E791C176A6139242A988ABA8B3D9B38A01085638@hasmsx403.iil.intel.com>
2003-03-27 13:32 ` BUG or not? GFP_KERNEL with interrupts disabled shmulik.hen
2003-03-27 13:43 ` David S. Miller
2003-03-27 14:11 ` Trond Myklebust
2003-03-27 14:12 ` David S. Miller
2003-03-27 17:22 ` Linus Torvalds
2003-03-27 17:55 ` David S. Miller
2003-03-27 18:04 ` Linus Torvalds
2003-03-27 18:07 ` David S. Miller
2004-10-10 1:38 ` udp_recvmsg: possible bug causing infinite hang? Chad N. Tindel
2004-10-10 1:45 ` David S. Miller
2004-10-10 1:54 ` Chad N. Tindel
2004-10-12 5:32 ` Nagendra Singh Tomar
2004-10-12 5:32 ` Chad N. Tindel [this message]
2004-10-12 6:08 ` Nagendra Singh Tomar
2004-10-12 8:56 ` Henrik Nordstrom
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=20041012053233.GB62811@calma.pair.com \
--to=chad@tindel.net \
--cc=linux-net@vger.kernel.org \
--cc=nagendra_tomar@adaptec.com \
--cc=netdev@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).