[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <550739F6.7080606@ezchip.com>
Date: Mon, 16 Mar 2015 16:15:50 -0400
From: Chris Metcalf <cmetcalf@...hip.com>
To: Colin King <colin.king@...onical.com>,
Joe Perches <joe@...ches.com>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arch: tile: fix null pointer dereference on pt_regs pointer
On 3/1/2015 3:12 PM, Colin King wrote:
> From: Colin Ian King<colin.king@...onical.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@...onical.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists