Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: mgmt: Fix dereference after NULL check
Date: Thu, 4 Oct 2012 15:17:02 +0300	[thread overview]
Message-ID: <20121004121702.GA31328@x220> (raw)
In-Reply-To: <1349348218-676-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

Hi Andrei,

On Thu, Oct 04, 2012, Andrei Emeltchenko wrote:
> hdev might be NULL, so we need to avoid possible NULL derefernce in
> handler->func functions.
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
>  net/bluetooth/mgmt.c |   14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)

Nack. Some of the handlers actually should be getting a NULL hdev and
there's code higher up in the function you're changing that ensures that
NULL is allowed for those handlers but not for any others (which should
safely be able to skip NULL checks).

Johan

  reply	other threads:[~2012-10-04 12:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04 10:56 [PATCH] Bluetooth: mgmt: Fix dereference after NULL check Andrei Emeltchenko
2012-10-04 12:17 ` Johan Hedberg [this message]
2012-10-04 12:33   ` Andrei Emeltchenko

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=20121004121702.GA31328@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=Andrei.Emeltchenko.news@gmail.com \
    --cc=linux-bluetooth@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