From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933792AbbCPUQF (ORCPT ); Mon, 16 Mar 2015 16:16:05 -0400 Received: from mail-db3on0082.outbound.protection.outlook.com ([157.55.234.82]:15836 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932917AbbCPUQD (ORCPT ); Mon, 16 Mar 2015 16:16:03 -0400 Message-ID: <550739F6.7080606@ezchip.com> Date: Mon, 16 Mar 2015 16:15:50 -0400 From: Chris Metcalf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Colin King , Joe Perches CC: Subject: Re: [PATCH] arch: tile: fix null pointer dereference on pt_regs pointer References: <1425240746-3974-1-git-send-email-colin.king@canonical.com> In-Reply-To: <1425240746-3974-1-git-send-email-colin.king@canonical.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: BLUPR07CA0035.namprd07.prod.outlook.com (10.255.223.148) To AM3PR02MB0533.eurprd02.prod.outlook.com (25.160.6.139) Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR02MB0533; X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10009020)(6049001)(6009001)(24454002)(51704005)(479174004)(377454003)(41574002)(65956001)(65806001)(66066001)(47776003)(50466002)(36756003)(33656002)(46102003)(87976001)(99136001)(42186005)(23746002)(86362001)(19580395003)(19580405001)(80316001)(83506001)(77096005)(15975445007)(2950100001)(87266999)(50986999)(54356999)(62966003)(92566002)(40100003)(77156002)(122386002)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR02MB0533;H:[10.7.0.239];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:AM3PR02MB0533;BCL:0;PCL:0;RULEID:;SRVR:AM3PR02MB0533; X-Forefront-PRVS: 05177D47DC X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2015 20:15:58.9140 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR02MB0533 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/1/2015 3:12 PM, Colin King wrote: > From: Colin Ian King > > 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 > --- > 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