From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: mgmt: Fix dereference after NULL check
Date: Thu, 4 Oct 2012 15:33:26 +0300 [thread overview]
Message-ID: <20121004123325.GC12229@aemeltch-MOBL1> (raw)
In-Reply-To: <20121004121702.GA31328@x220>
Hi Johan,
On Thu, Oct 04, 2012 at 03:17:02PM +0300, Johan Hedberg wrote:
> 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).
True, BTW: this would be nice to put this explanation as comment there.
Best regards
Andrei Emeltchenko
prev parent reply other threads:[~2012-10-04 12:33 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
2012-10-04 12:33 ` Andrei Emeltchenko [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=20121004123325.GC12229@aemeltch-MOBL1 \
--to=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