Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com>,
	linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Do not dereference zero sk
Date: Thu, 16 Feb 2012 15:17:45 +0200	[thread overview]
Message-ID: <20120216131745.GD16080@x220.ger.corp.intel.com> (raw)
In-Reply-To: <1329225150.28848.74.camel@aeonflux>

Hi,

On Tue, Feb 14, 2012, Marcel Holtmann wrote:
> > Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> > ---
> >  net/bluetooth/l2cap_sock.c |    4 +++-
> >  1 files changed, 3 insertions(+), 1 deletions(-)
> > 
> > diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> > index 1636029..138fe34 100644
> > --- a/net/bluetooth/l2cap_sock.c
> > +++ b/net/bluetooth/l2cap_sock.c
> > @@ -795,7 +795,7 @@ static void l2cap_sock_kill(struct sock *sk)
> >  static int l2cap_sock_shutdown(struct socket *sock, int how)
> >  {
> >  	struct sock *sk = sock->sk;
> > -	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
> > +	struct l2cap_chan *chan;
> >  	int err = 0;
> >  
> >  	BT_DBG("sock %p, sk %p", sock, sk);
> > @@ -803,6 +803,8 @@ static int l2cap_sock_shutdown(struct socket *sock, int how)
> >  	if (!sk)
> >  		return 0;
> >  
> > +	chan = l2cap_pi(sk)->chan;
> > +
> 
> funny that this never caused any problems so far.
> 
> Acked-by: Marcel Holtmann <marcel@holtmann.org>

Applied to my bluetooth-next tree. Thanks.

Johan

      parent reply	other threads:[~2012-02-16 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14 13:12 [PATCH] Bluetooth: Do not dereference zero sk Emeltchenko Andrei
2012-02-14 13:12 ` Marcel Holtmann
2012-02-14 13:27   ` Szymon Janc
2012-02-16 13:17   ` Johan Hedberg [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=20120216131745.GD16080@x220.ger.corp.intel.com \
    --to=johan.hedberg@gmail.com \
    --cc=Andrei.Emeltchenko.news@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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