From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751209AbdFACqG (ORCPT ); Wed, 31 May 2017 22:46:06 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:25622 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbdFACqF (ORCPT ); Wed, 31 May 2017 22:46:05 -0400 To: "Gustavo A. R. Silva" Cc: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: lpfc: prevent potential null pointer dereference From: "Martin K. Petersen" Organization: Oracle Corporation References: <20170523150928.GA24570@embeddedgus> Date: Wed, 31 May 2017 22:45:47 -0400 In-Reply-To: <20170523150928.GA24570@embeddedgus> (Gustavo A. R. Silva's message of "Tue, 23 May 2017 10:09:28 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gustavo A., > Null check at line 966: if (ndlp) {, implies that ndlp might be NULL. > Functions lpfc_nlp_set_state() and lpfc_issue_els_prli() dereference > pointer ndlp. Include these function calls inside the IF block that > tests pointer ndlp. Applied to 4.12/scsi-fixes. Thank you! -- Martin K. Petersen Oracle Linux Engineering