mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Schwartz" <davids@webmaster.com>
To: <linux-kernel@vger.kernel.org>
Subject: RE: PROBLEM: close(fd) doesn't wake up read(fd) or select() in another thread
Date: Sat, 15 Jul 2006 23:44:50 -0700	[thread overview]
Message-ID: <MDEHLPKNGKAHNMBLJOLKEEFDNDAB.davids@webmaster.com> (raw)
In-Reply-To: <200607141146.52908.mikell@optonline.net>


> [1.] One line summary of the problem:
> 	close(fd) doesn't wake up read(fd) or select() in another thread

	If you delete a resource in one thread while another thread is using it,
anything can happen. This is as serious a bug as calling 'free' on a block
of memory while another thread is using it.

	You can never be sure the other thread was in 'read' or 'select' (as
opposed to being about to call it and then being pre-empted), so such code
will always have race conditions.

	DS



      parent reply	other threads:[~2006-07-16  6:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-14 15:46 Michael Lindner
2006-07-14 19:07 ` Michael Lindner
2006-07-14 19:51   ` Alistair John Strachan
2006-07-16  6:44 ` David Schwartz [this message]

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=MDEHLPKNGKAHNMBLJOLKEEFDNDAB.davids@webmaster.com \
    --to=davids@webmaster.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®