From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757478AbdJKPaO (ORCPT ); Wed, 11 Oct 2017 11:30:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34650 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbdJKPaL (ORCPT ); Wed, 11 Oct 2017 11:30:11 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2BBC07F3F8 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=thenzl@redhat.com Subject: Re: [PATCH 02/10] mpt3sas: Fixed memory leaks in driver To: Sreekanth Reddy , linux-scsi@vger.kernel.org, hch@infradead.org Cc: martin.petersen@oracle.com, JBottomley@Parallels.com, Sathya.Prakash@broadcom.com, linux-kernel@vger.kernel.org References: <1507641083-20207-1-git-send-email-Sreekanth.Reddy@broadcom.com> <1507641083-20207-3-git-send-email-Sreekanth.Reddy@broadcom.com> From: Tomas Henzl Message-ID: Date: Wed, 11 Oct 2017 17:30:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1507641083-20207-3-git-send-email-Sreekanth.Reddy@broadcom.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 11 Oct 2017 15:30:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/10/2017 03:11 PM, Sreekanth Reddy wrote: > Fixed below memory leak in driver, > > * While removing Expander devices - we are removing expander > device entry from the list before freeing it's child devices, > so while freeing child device we are finding its parent device > node as NULL and so we are not freeing the child device's > allocated data structures. > Updated the driver to remove the expander device from the list > only after freeing all its child devices. > > Signed-off-by: Sreekanth Reddy Signed-off-by: Tomas Henzl Tomas