Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753870AbcDOCoQ (ORCPT ); Thu, 14 Apr 2016 22:44:16 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:48384 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752161AbcDOCoN (ORCPT ); Thu, 14 Apr 2016 22:44:13 -0400 To: Sudip Mukherjee Cc: Sathya Prakash , Chaitra P B , Suganath Prabu Subramani , "James E.J. Bottomley" , "Martin K. Petersen" , linux-kernel@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Subject: Re: [PATCH] mpt3sas: fix possible NULL dereference From: "Martin K. Petersen" Organization: Oracle Corporation References: <1460130162-30011-1-git-send-email-sudipm.mukherjee@gmail.com> Date: Thu, 14 Apr 2016 22:43:57 -0400 In-Reply-To: <1460130162-30011-1-git-send-email-sudipm.mukherjee@gmail.com> (Sudip Mukherjee's message of "Fri, 8 Apr 2016 21:12:42 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (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 Content-Length: 407 Lines: 11 >>>>> "Sudip" == Sudip Mukherjee writes: Sudip> We are dereferencing ioc->sense_dma_pool in pci_pool_free() and Sudip> after that we are checking if it is NULL, before calling Sudip> pci_pool_destroy(). Lets check if it is NULL before calling both Sudip> pci_pool_free() and pci_pool_destroy(). Broadcom folks, please review. -- Martin K. Petersen Oracle Linux Engineering