mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Colin King <colin.king@canonical.com>
Cc: Harry Morris <h.morris@cascoda.com>,
	linuxdev@cascoda.com, Alexander Aring <aar@pengutronix.de>,
	Stefan Schmidt <stefan@osg.samsung.com>,
	linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures
Date: Wed, 29 Mar 2017 20:54:53 +0200	[thread overview]
Message-ID: <80D11AF4-0CD7-4FEE-AF17-AD79FBFBD294@holtmann.org> (raw)
In-Reply-To: <20170329170540.21011-1-colin.king@canonical.com>

Hi Colin,

> Ensure we don't end up with a null pointer dereferences by checking
> for for allocation failures.  Allocate by sizeof(*ptr) rather than
> the type to fix checkpack warnings.  Also merge multiple lines into
> one line for the kmalloc call.
> 
> Detected by CoverityScan, CID#1422435 ("Dereference null return value")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/ieee802154/ca8210.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

      parent reply	other threads:[~2017-03-29 18:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 17:05 Colin King
2017-03-29 17:17 ` David Miller
2017-03-29 18:51   ` Marcel Holtmann
2017-03-29 18:54 ` Marcel Holtmann [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=80D11AF4-0CD7-4FEE-AF17-AD79FBFBD294@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=aar@pengutronix.de \
    --cc=colin.king@canonical.com \
    --cc=h.morris@cascoda.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=linuxdev@cascoda.com \
    --cc=netdev@vger.kernel.org \
    --cc=stefan@osg.samsung.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

all inboxes | Powered by JetHome®