linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Gustavo F. Padovan" <padovan@profusion.mobi>
To: Ville Tervo <ville.tervo@nokia.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH 7/7] Bluetooth: Fix not returning proper error in RFCOMM
Date: Fri, 5 Nov 2010 10:26:52 -0400	[thread overview]
Message-ID: <20101105142652.GA9116@vigoh> (raw)
In-Reply-To: <20101105140158.GE19903@null>

Hi Ville,

* Ville Tervo <ville.tervo@nokia.com> [2010-11-05 16:01:58 +0200]:

> Hi Gustavo,
> 
> On Tue, Nov 02, 2010 at 04:03:18PM +0100, ext Gustavo F. Padovan wrote:
> > Return 0 in that situation could lead to errors in the caller.
> > 
> > Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> > ---
> >  net/bluetooth/rfcomm/sock.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
> > index e48fbca..cd7e27a 100644
> > --- a/net/bluetooth/rfcomm/sock.c
> > +++ b/net/bluetooth/rfcomm/sock.c
> > @@ -930,7 +930,7 @@ int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel, struct rfcomm_dlc *
> >  	/* Check if we have socket listening on channel */
> >  	parent = rfcomm_get_sock_by_channel(BT_LISTEN, channel, &src);
> >  	if (!parent)
> > -		return 0;
> > +		return -EINVAL;
> 
> Did you check rfcomm/core.c?
> 
> I think this change breaks the logic in there. IOW continues connection
> establisment instead of tearing down the link.

I understood that part of the code wrong, I'm going to drop this patch.
Thanks fo looking into this.

-- 
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi

  reply	other threads:[~2010-11-05 14:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 15:03 [PATCH 1/7] Bluetooth: Hold the lock inside l2cap_get_sock_by_addr() Gustavo F. Padovan
2010-11-02 15:03 ` [PATCH 2/7] Bluetooth: Hold the lock inside sco_get_sock_by_addr() Gustavo F. Padovan
2010-11-02 15:03   ` [PATCH 3/7] Bluetooth: Hold the lock inside rfcomm_get_sock_by_addr() Gustavo F. Padovan
2010-11-02 15:03     ` [PATCH 4/7] Bluetooth: Get ride of __l2cap_get_sock_by_psm() Gustavo F. Padovan
2010-11-02 15:03       ` [PATCH 5/7] Bluetooth: Get ride of __rfcomm_get_sock_by_channel() Gustavo F. Padovan
2010-11-02 15:03         ` [PATCH 6/7] Bluetooth: Fix not returning proper error in SCO Gustavo F. Padovan
2010-11-02 15:03           ` [PATCH 7/7] Bluetooth: Fix not returning proper error in RFCOMM Gustavo F. Padovan
2010-11-05 14:01             ` Ville Tervo
2010-11-05 14:26               ` Gustavo F. Padovan [this message]
2010-11-05 13:49 ` [PATCH 1/7] Bluetooth: Hold the lock inside l2cap_get_sock_by_addr() Ville Tervo
2010-11-05 14:37   ` Gustavo F. Padovan
2010-11-10  5:39     ` Marcel Holtmann
2010-11-10 15:47       ` Gustavo F. Padovan
2010-11-17 23:11     ` Gustavo F. Padovan
2010-11-17 23:17       ` Gustavo F. Padovan

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=20101105142652.GA9116@vigoh \
    --to=padovan@profusion.mobi \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=ville.tervo@nokia.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).