Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbcDORf5 (ORCPT ); Fri, 15 Apr 2016 13:35:57 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:34779 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751747AbcDORfz (ORCPT ); Fri, 15 Apr 2016 13:35:55 -0400 From: Sathya Prakash Veerichetty References: <1460130162-30011-1-git-send-email-sudipm.mukherjee@gmail.com> In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQEl2c4ZYwxWgK4Aad0zQVAfZoifOQHRBna8oNQ+TsA= Date: Fri, 15 Apr 2016 11:35:48 -0600 Message-ID: <5b2eca0b5053d01c09f62cf498e3fc0a@mail.gmail.com> Subject: RE: [PATCH] mpt3sas: fix possible NULL dereference To: "Martin K. Petersen" , Sudip Mukherjee Cc: Chaitra Basappa , Suganath Prabu Subramani , "James E.J. Bottomley" , linux-kernel@vger.kernel.org, PDL-MPT-FUSIONLINUX , linux-scsi@vger.kernel.org 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: 1147 Lines: 29 We need to do some more changes in this. The concept is first pool alloc and then memory alloc in the pool, so the memory has to be freed if the memory is allocated in the pool and irrespective of memory allocated or not the pool has to be destroyed if it is created. We will work internally and provide a complete patch. Thanks Sathya -----Original Message----- From: Martin K. Petersen [mailto:martin.petersen@oracle.com] Sent: Thursday, April 14, 2016 8:44 PM 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 >>>>> "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