Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbdHUHVK (ORCPT ); Mon, 21 Aug 2017 03:21:10 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:36209 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbdHUHVJ (ORCPT ); Mon, 21 Aug 2017 03:21:09 -0400 MIME-Version: 1.0 In-Reply-To: <2f826631-68d2-6a7e-a656-9c8e67ee8337@oracle.com> References: <1501475496-10267-1-git-send-email-j-keerthy@ti.com> <2f826631-68d2-6a7e-a656-9c8e67ee8337@oracle.com> From: Arnd Bergmann Date: Mon, 21 Aug 2017 09:21:05 +0200 X-Google-Sender-Auth: nq2H3Js9VEFOhbBZQ5Rhj3HlL0o Message-ID: Subject: Re: [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create To: "santosh.shilimkar@oracle.com" Cc: "arm@kernel.org" , Keerthy , Santosh Shilimkar , Murali Karicheri , Tero Kristo , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 691 Lines: 25 On Mon, Aug 21, 2017 at 7:44 AM, santosh.shilimkar@oracle.com wrote: > Hi Arnd, > > On 7/30/17 9:31 PM, Keerthy wrote: >> >> knav_pool_create is an exported function. In the event of a call >> before knav_queue_probe, we encounter a NULL pointer dereference >> in the following line. Hence return -EPROBE_DEFER to the caller till >> the kdev pointer is non-NULL. >> >> Signed-off-by: Keerthy >> --- >> >> Changes in v2: >> >> * Fixed returning an int to returning pointer. > > FWIW, Acked-by: Santosh Shilimkar > > Can you please also apply this fix in your fixes branch ? Applied now, thanks! Arnd