Linux bluetooth development
 help / color / mirror / Atom feed
From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Max Krasnyansky <maxk@qualcomm.com>,
	BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: L2CAP non-blocking socket nasty race conditions
Date: Thu, 5 Feb 2004 15:43:17 -0800	[thread overview]
Message-ID: <20040205234317.GA11427@bougret.hpl.hp.com> (raw)
In-Reply-To: <1076024244.2806.20.camel@pegasus>

On Fri, Feb 06, 2004 at 12:37:24AM +0100, Marcel Holtmann wrote:
> Hi Jean,
> 
> > 	There is one thing I don't like about your patch : you disable
> > error checking for listening socket. I don't think it's right,
> > especially for checking socket shutdown.
> > 	Let's take the following scenario. Multi-threaded program, one
> > listening l2cap socket. One thread poll/select on the socket. At some
> > point, the second thread close the socket. I would expect the first
> > thread to receive a POLLHUP. Note that you can do the same with a
> > single threaded program, closing the listening socket in the signal
> > handler.
> > 	The attached patch is a minor modification of your patch that
> > should fix this issue.
> 
> take a look at tcp_poll() in net/ipv4/tcp.c, because they do it the same
> and do we really have to care about it? How does TCP handles this case?
> 
> Regards
> 
> Marcel

	Well, it never hurts to be on the safe side. And if you look
at my patch, you would see that it's only a trivial change to your
patch. Anyway, up to you...

	Jean

  reply	other threads:[~2004-02-05 23:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-04  1:58 L2CAP non-blocking socket nasty race conditions Jean Tourrilhes
2004-02-04  7:17 ` [Bluez-devel] " Marcel Holtmann
2004-02-04 17:58   ` Jean Tourrilhes
2004-02-04 19:58     ` [Bluez-devel] " Marcel Holtmann
2004-02-04 21:45       ` Jean Tourrilhes
2004-02-05  1:00         ` [Bluez-devel] " Marcel Holtmann
2004-02-05  1:11           ` Jean Tourrilhes
2004-02-05  1:30             ` [Bluez-devel] " Marcel Holtmann
2004-02-05  1:40               ` Jean Tourrilhes
2004-02-05  2:21                 ` [Bluez-devel] " Marcel Holtmann
2004-02-05  2:26                   ` Jean Tourrilhes
2004-02-05  2:36                     ` [Bluez-devel] " Marcel Holtmann
2004-02-05  2:42                       ` Jean Tourrilhes
2004-02-05  3:30                       ` Jean Tourrilhes
2004-02-05 13:49                         ` [Bluez-devel] " Marcel Holtmann
2004-02-05 17:19                           ` Jean Tourrilhes
2004-02-05 18:17                             ` [Bluez-devel] " Marcel Holtmann
2004-02-05 23:13                               ` Jean Tourrilhes
2004-02-05 23:37                                 ` [Bluez-devel] " Marcel Holtmann
2004-02-05 23:43                                   ` Jean Tourrilhes [this message]
2004-02-04 11:23 ` [Bluez-devel] bluez & qos Mauro Tortonesi
2004-02-04 11:36   ` Marcel Holtmann
2004-02-04 17:46   ` [Bluez-devel] " Jean Tourrilhes
2004-02-05 10:46     ` Mauro Tortonesi
2004-02-05 17:22       ` Jean Tourrilhes

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=20040205234317.GA11427@bougret.hpl.hp.com \
    --to=jt@bougret.hpl.hp.com \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=jt@hpl.hp.com \
    --cc=marcel@holtmann.org \
    --cc=maxk@qualcomm.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