From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0497741C5F; Fri, 10 Feb 2023 10:29:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E395040EE6; Fri, 10 Feb 2023 10:29:01 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 03C0740687; Fri, 10 Feb 2023 10:28:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676021340; x=1707557340; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=ywa8LTp7OXqvcOXIoG4H5dR1+hZXlkpZaWcLees5ShY=; b=GhGCf/TopDjGdfBaIi2+J1VRxb7C44o4WWJwkTlEQz/Mpc8tooj3w5fU l6ZeqAROrgBKhbIfLasAj6mu4PBYjwDMJq22RHgbasUDRHEOsnz0F27UL oaAJ9XUjg5kiBV2ahiAWJyHEqJEgUiTlv4/ZXQHpbi9Z+T/whmC+5oF6q RRcI6mU+Dh7TbOSwQ/o4Q9lgSd2agYQX1BWjGNpph/SjwUr0ppDKeFuMC WU6/qsgchYTHQdiONvpAyuRQzus9JzcHWoluMhBadMdo+OgvDywn/H9wU hFIq2cuLPLfRigH2gi1oZVFNuxs5L5pXkqWOPuZlDAlEGZLGJnOJt9MJR w==; X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="331680917" X-IronPort-AV: E=Sophos;i="5.97,286,1669104000"; d="scan'208";a="331680917" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2023 01:28:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="617838893" X-IronPort-AV: E=Sophos;i="5.97,286,1669104000"; d="scan'208";a="617838893" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga003.jf.intel.com with ESMTP; 10 Feb 2023 01:28:59 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 10 Feb 2023 01:28:58 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 10 Feb 2023 01:28:58 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Fri, 10 Feb 2023 01:28:58 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.40) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Fri, 10 Feb 2023 01:28:58 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+aFh/UZbux3R8jhDqofMh0w5qwkOj3cGeXouGEkIeqQBKJ54rh2f16mjGl0PrPot9g3JUu7wDSGEBPP47o2/OQVXxv/H34xQnpHbBeaRB+cTAR+qhx+1qW5Iw+k0AK4IPe1/np9TtImNKenTBtq8chfSO1k9DdaA3cMtJGhYPfLaSD+X8iDsak5qhOJbbKQ5DW9nlRN88/kj0CjVWQkqQ3VDuntk7JdX1nOUt3cKK9SE47BOLZJV7eTTvZW8xTMVw/riy6bibt9Gt4XVxatP04LWvNmz6Xr8Y23EqGIm4TMRUBFFJieyZBgo+BpITLPEv9SXTgSnk9Ypm9OQI9zgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=A5md4b95uAEMSb9hisC1iKgaF6aCbM0Ti3iVt8U/c9Y=; b=j80wWUw42ZgBoWOsW/Hv4kDwwtBxB2gAY1gl6ZUFDHJn+ufHN4yBw5QghT4njlBqK80MaGuyPu94Jb3Wx/QDhcJTMBfYJUbys1qnpdBxA3+fJd11QlSn8ICP1HUhm7CdaCgv6GlfHIRcPFig13LsmpCd/VfOfYmuKpwet7rQPoUAVO4ybC1adU3CsmUdlN/8Y3Ze8Oqfahp1MtPeoFIajnbhRxoKPJnn0mQ9M45mytNnDbOEcJq1PqV2wSjcT1CpnGLNBjjwVvlkYEyH2xYyU/CbvfY9GQ1RgUu3ciZq4HO1BnK6P2s4vSCl3HHn3G/b85I6byHGaM6eiEGslKMgbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19; Fri, 10 Feb 2023 09:28:56 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::96f4:ad8:3fb9:b60d]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::96f4:ad8:3fb9:b60d%7]) with mapi id 15.20.6064.032; Fri, 10 Feb 2023 09:28:56 +0000 Message-ID: Date: Fri, 10 Feb 2023 09:28:49 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2] bus: fix leak for devices without driver Content-Language: en-US To: Volodymyr Fialko , , Bruce Richardson , =?UTF-8?Q?Morten_Br=c3=b8rup?= CC: , , References: <20230107151230.2539470-1-vfialko@marvell.com> <20230209132207.1994066-1-vfialko@marvell.com> From: Kevin Laatz In-Reply-To: <20230209132207.1994066-1-vfialko@marvell.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0392.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:f::20) To MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR11MB5872:EE_|BN9PR11MB5483:EE_ X-MS-Office365-Filtering-Correlation-Id: 223addaa-54f0-42cf-97a2-08db0b493b6f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2Zf/VCjC9K/q3ziKyiel6hv4miQEyNiNdJ2Ihqd6v++7DBKWQ5s+Gc5wJueFJgNnFLAuqbUpg0j2MN85eF8TInbRWFDRU2y/1tzyrE/rxyQxMQWLe6IxqxTl0ygJ1to6NRMNcPBVaAizAiNOCgHEDabzpk8QpIdv/KWJGbLsGwE2E4GHSpovjA6e2O27WMZwunKtKaG6OFvtw9Yobd6LNVMlWClSKudTFdc5k9t5NJb8gnTQUumHlhwhayJutmEryWNuBNJ59o4EwDF0+SGl/fVvAkHGarwzOIA8roSrgZ9b2fuq5QLX9qZW5l4rrdEsIJrHvjy2bZXT6RbAJr6wPBRFIlFym11QAGpka11MUAk0285sP3/IFNu3zasz/KGpf39SuEmtTIWH30NdRN3DOgtiVrqWDm7i0lA4VKezpZO85azbhQKN1DXH6550gaVZ9tdbgG5FusBehDK1HMWGduTt96JS5np/TA3DiVe5xIsxYjpcci4ZoHicD5w3azMpXrkxNagSbwYXz8wKxCXyqLe+UMJxPVTzpOzBQA2R6RzCEhropog/aVO0ojVTQohZUyus0O8CqRE02eCJPaERZK7eR/SvouzCB0pVgX/aOp6NB9CMdDrixIaBFAtNdHek5KeUW61tST9TURAYIr74xAoSvp1yx7mxYiwYMy+ZVxFDXD5TWUJ/P4B9CDbj71UNCZCMbd81R/ubR0FeTbOSQMwjuQDA+S7uRwgRd8l6ls0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5872.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(136003)(346002)(396003)(376002)(366004)(39860400002)(451199018)(5660300002)(6666004)(8676002)(83380400001)(8936002)(4744005)(44832011)(31686004)(41300700001)(66476007)(4326008)(66556008)(2906002)(53546011)(316002)(38100700002)(6512007)(26005)(6506007)(66946007)(86362001)(6486002)(478600001)(36756003)(186003)(110136005)(31696002)(2616005)(82960400001)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cDJlTGlXd1NydFRTS1RHTWZFTmJFWU9Nd3ZRVktVaC9sSWtFaEdFNm90Rnoz?= =?utf-8?B?RXprTldJZEJVeld0MTFmdjNpa1Q5ZUMydWpUL3NJVlZGNUFFQjFsSFBBSzhB?= =?utf-8?B?Vm1lRjA0L0hhTUdRdWFlTzg0YnNkQWs3aHduQjNBblNWdFVTempNZXd2YnZK?= =?utf-8?B?dkZMbUJiKzRIckRlbmR2RUhBYkxrRzBIa3pIRmcyOFdNUHJ1THduczcrcmVW?= =?utf-8?B?OFhZZ2tWMnFZaW8r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ZEpjem44OXJRcHVPeUU1UXhSMXB0UkpCVjFuVkFPd3Z4?= =?utf-8?B?b3V4UEIrZzRwSUpUVm1uN1ZveEJwaldUTktUU2I2eDcyNmtmN0Q5b09FdFdp?= =?utf-8?B?Ymc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 223addaa-54f0-42cf-97a2-08db0b493b6f X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2023 09:28:56.4506 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DUFXUG5csw/d4MHnV9FQL9zfRDInyLqygxM0QOeBs3dKBKxkDyIamFH6gsTYzU4kTiuvdTFu7ThzhdunDUVX/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5483 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 09/02/2023 13:22, Volodymyr Fialko wrote: > During the bus scan, memory for device configuration is allocated. > Currently, if a driver wasn't attached to the device during initialization, > memory for that device will not be released at bus cleanup. > This patch address this issue and releases the memory for all allocated > devices. > > Fixes: 1cab1a40ea9b ("bus: cleanup devices on shutdown") > Cc: stable@dpdk.org > > Signed-off-by: Volodymyr Fialko > --- > V2: > - Updated commit message. > > drivers/bus/pci/pci_common.c | 3 ++- > drivers/bus/vdev/vdev.c | 5 +++-- > 2 files changed, 5 insertions(+), 3 deletions(-) > Acked-by: Kevin Laatz