From: Chris Metcalf <cmetcalf@ezchip.com>
To: Colin King <colin.king@canonical.com>, Joe Perches <joe@perches.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arch: tile: fix null pointer dereference on pt_regs pointer
Date: Mon, 16 Mar 2015 16:15:50 -0400 [thread overview]
Message-ID: <550739F6.7080606@ezchip.com> (raw)
In-Reply-To: <1425240746-3974-1-git-send-email-colin.king@canonical.com>
On 3/1/2015 3:12 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Cppcheck reports the following issue:
> [arch/tile/kernel/stack.c:116]: (error) Possible null
> pointer dereference: p
>
> In this case, on reporting on an odd fault, p is set to NULL
> and immediately afterwords p is dereferenced iff
> !kbt->profile is false. Rather than doing this check just
> return NULL rather than falling through to the potential
> null pointer dereference (since the original intentional
> outcome would be to return NULL anyhow) for this odd fault
> case.
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
> arch/tile/kernel/stack.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks! I tweaked this a bit and took it into the tile tree.
--
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com
prev parent reply other threads:[~2015-03-16 20:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-01 20:12 [PATCH] arch: tile: fix null pointer dereference on pt_regs pointer Colin King
2015-03-16 20:15 ` Chris Metcalf [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=550739F6.7080606@ezchip.com \
--to=cmetcalf@ezchip.com \
--cc=colin.king@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@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 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.