From: gregkh@linuxfoundation.org (Greg KH)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] nvmem: sunxi: Check for memory allocation failure
Date: Sun, 4 Oct 2015 12:04:21 +0100 [thread overview]
Message-ID: <20151004110421.GB7110@kroah.com> (raw)
In-Reply-To: <1443616591-17867-1-git-send-email-srinivas.kandagatla@linaro.org>
On Wed, Sep 30, 2015 at 01:36:31PM +0100, Srinivas Kandagatla wrote:
> From: Maxime Ripard <maxime.ripard@free-electrons.com>
>
> The sunxi_sid driver doesn't check for kmalloc return status before
> derefencing the returned pointer, which could lead to a NULL pointer
> dereference if kmalloc failed. Check for its return code to make sure it
> deosn't happen.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
> drivers/nvmem/sunxi_sid.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
No signed-off-by: from you on this patch?
:(
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: maxime.ripard@free-electrons.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 4/4] nvmem: sunxi: Check for memory allocation failure
Date: Sun, 4 Oct 2015 12:04:21 +0100 [thread overview]
Message-ID: <20151004110421.GB7110@kroah.com> (raw)
In-Reply-To: <1443616591-17867-1-git-send-email-srinivas.kandagatla@linaro.org>
On Wed, Sep 30, 2015 at 01:36:31PM +0100, Srinivas Kandagatla wrote:
> From: Maxime Ripard <maxime.ripard@free-electrons.com>
>
> The sunxi_sid driver doesn't check for kmalloc return status before
> derefencing the returned pointer, which could lead to a NULL pointer
> dereference if kmalloc failed. Check for its return code to make sure it
> deosn't happen.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
> drivers/nvmem/sunxi_sid.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
No signed-off-by: from you on this patch?
:(
next prev parent reply other threads:[~2015-10-04 11:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 12:31 [PATCH 0/4] nvmem: fixes for next rc Srinivas Kandagatla
2015-09-30 12:31 ` Srinivas Kandagatla
2015-09-30 12:33 ` [PATCH 1/4] nvmem: core: fix the out-of-range leak in read/write() Srinivas Kandagatla
2015-09-30 12:33 ` Srinivas Kandagatla
2015-09-30 12:35 ` [PATCH 2/4] nvmem: core: Handle shift bits in-place if cell->nbits is non-zero Srinivas Kandagatla
2015-09-30 12:35 ` Srinivas Kandagatla
2015-09-30 12:36 ` [PATCH 3/4] nvmem: core: Fix memory leak in nvmem_cell_write Srinivas Kandagatla
2015-09-30 12:36 ` Srinivas Kandagatla
2015-09-30 12:36 ` [PATCH 4/4] nvmem: sunxi: Check for memory allocation failure Srinivas Kandagatla
2015-09-30 12:36 ` Srinivas Kandagatla
2015-10-04 11:04 ` Greg KH [this message]
2015-10-04 11:04 ` Greg KH
2015-10-04 14:40 ` Srinivas Kandagatla
2015-10-04 14:40 ` Srinivas Kandagatla
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=20151004110421.GB7110@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.