All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: netdev@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>,
	Christoph Lameter <clameter@sgi.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: select(0, ..) is valid ?
Date: Tue, 15 May 2007 10:42:55 -0700	[thread overview]
Message-ID: <4649F11F.3040807@zytor.com> (raw)
In-Reply-To: <1179250159.2836.117.camel@dyn9047017100.beaverton.ibm.com>

Badari Pulavarty wrote:
> Hi,
> 
> Is select(0, ..) is a valid operation ?
> 
> I see that there is no check to prevent this or return
> success early, without doing any work. Do we need one ?
> 
> slub code is complaining that we are doing kmalloc(0).
> 

select(0, ...) is valid, and is functionally equivalent to
select(..., NULL, NULL, NULL, ...); except that any nonzero fdsets get
zeroed on return.  As such, the only thing that can interrupt it is the
timeout, or a signal.

	-hpa

  parent reply	other threads:[~2007-05-15 17:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15 17:29 select(0, ..) is valid ? Badari Pulavarty
2007-05-15 17:34 ` Mark Glines
2007-05-15 17:36 ` Jiri Slaby
2007-05-15 17:42 ` H. Peter Anvin [this message]
2007-05-15 17:43 ` Alan Cox
2007-05-15 17:44 ` Andrew Morton
2007-05-15 17:57   ` Badari Pulavarty
2007-05-15 18:10   ` Christoph Lameter
2007-05-15 18:30     ` Andrew Morton
2007-05-15 18:36       ` Christoph Lameter
2007-05-15 18:44     ` Hugh Dickins
2007-05-16 15:37       ` Anton Blanchard
2007-05-17  0:59         ` Badari Pulavarty
2007-05-22 14:16           ` Steve Fox
2007-05-22 14:34             ` Nishanth Aravamudan
2007-05-22 17:49               ` Steve Fox
2007-05-18 13:21         ` Andi Kleen
2007-05-22  1:21           ` Nish Aravamudan

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=4649F11F.3040807@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pbadari@us.ibm.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 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.