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 D2D7341CC1 for ; Fri, 17 Feb 2023 17:18:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6E804161A; Fri, 17 Feb 2023 17:18:21 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2057.outbound.protection.outlook.com [40.107.93.57]) by mails.dpdk.org (Postfix) with ESMTP id 0107040EE3; Fri, 17 Feb 2023 17:18:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BgWNvlJmlm1cOx2WRIuD5J2lsOva8pUYGRs5nGl9QJxJNsT+ylwAsWl+ZDKynR1C013iNDhILKf3Phg8ydSsGsukAi2LroyFAHhFN4fa68yuCBU2PmqCZZrNpnLFv8Y0L5iSr8gFSPHINLLMseCZCqRtTjAy1Y6YOsz1mYE8vPJ8DEeo7nfQgeaY2eGX5n8peo0ouVEr3JuYaiCZU9GjV0jzw9b2qUDfddmPCpI2ZOpnZw3OJZlHdDYBYTJ65ZYUV8RxEl+VSiA/UTQB/dc5+OAplvKr4eViT2LbP/tYNWk4mrWvfM+bp+JYXUC3zmgs5mGnfmsgcxJ4V/znVo8QZQ== 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=C2Qgt8fnYNo1WdinpGqQp0Q6o1IOxdFj1b5CN7YSWjk=; b=oGFXX7hcZ3vzTodW/92Oa3Funn66V1lM3jelWTTE23ZnHi6S488vTlj7UNQeIsvpwDQQ+h/TXH3/8dmwvR5IlMbKh4wdhLUzhuU9VYjC4rEFznQRiurEq3CzRTWhOK7xV80lrgTp0mOFoKVc3qSxZevq35KNG0FdV/3bkVWPjhasw7C4Hs2fY2y50uPNbC5+QiNOlZGo4N+/eNEJjmU2rZ/O03WpjVVyCKgOpvJ7yrNWMZbuaocKwSjC72YTh5FHL/7h7wPg97JJdG1dtpsrXukj/w8sCi13DAyESkkU7EmYaXLyMnigIf5b6stxDGD6ZeHm2QK5FXOsp2WopmT6vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C2Qgt8fnYNo1WdinpGqQp0Q6o1IOxdFj1b5CN7YSWjk=; b=0wir12eoF8HUEzuuJ9xjufiR0HR7HagxDmYU14xgvWxzEQtM9KRs0/fXkimFJCUfrtvRZfu8RYcRtjYXSdVn7q4DZ4NDfBrAvTq9e3JUNiYf3rrFnLksAWcB9I9Sk3Z1NPPxtoL2Ip/1jMkHjSQ3zpn+0s/zcG3IsMUivlIzFR8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH7PR12MB7113.namprd12.prod.outlook.com (2603:10b6:510:1ec::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.17; Fri, 17 Feb 2023 16:18:16 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48%7]) with mapi id 15.20.6111.013; Fri, 17 Feb 2023 16:18:15 +0000 Message-ID: Date: Fri, 17 Feb 2023 16:18:08 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH] app/testpmd: fix crash on cleanup Content-Language: en-US To: "Singh, Aman Deep" , David Marchand , dev@dpdk.org Cc: stable@dpdk.org, Yuying Zhang , Stephen Hemminger , Thomas Monjalon References: <20230206154946.750829-1-david.marchand@redhat.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0324.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a4::24) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB7113:EE_ X-MS-Office365-Filtering-Correlation-Id: 815aef16-6d97-4913-fe7c-08db110292cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ga/O5ydHeua/EzHcx2TVHq4xipIWE5vCpikL53VLfJJ0fZBpG7mrNlsdvEsDrOmRynLl3JqCQZDz8P5KYEOei53IbRnY2eK/AWVaKXWIurOh3mMAkqK2d9vad0gfGLTLoFqwWe6MH5/M9aYgIDoNC2vwuFn0Lqb2MejQCnYSeaXvJQVgxMDXxfKz3+BH2IsemgawZvrC75g5ZYNpjk9Kd6KYgefqIFSGJcsUgm3csPHJHquMe/da7hZiw8EKO2MHTR6R8gXwttr32YI2BeyjbJmw5zXj2egVsWuF1aipxsjwGW3vRRZEMBuzamzPB1/R1KUKeW5nMwwWClItIZ9tcypDC8wVt4X4LCWo/5y+GMuKOinhINXoK8n6/a0r7VlVKqyVRaa/NXh41+Dws9/P4VeaYE9AOsws9Vu7Z2hpEbvlLqtmg3xcy2CnlCBKuE/bcQXGYB4vVQj5mS4hh+ucHTQJyEDKdZUXqWx1T7VTmx8UitYWt1+Ga3553aB4wrGEueUB3a/ddPMgK4ESaDFywB1MPHBpUAy0MX42snGtBmpBwjHTNMfXSEpcdpk43v0Lv9CI5EaxV2RF7CQroMtgDW+YxNMH/EPVqvNohNA1g2fphvgAVdTVeSn+AJapRfmnVpeG3cosSNSzih5KupEMUQ0SUcfOM/t+vyo4uI1IlNhcvYtwiSwyixw1jp3Fkx39RaTfyd0zHuUoYTQ4X/VQOpP+d5o7A/bw3wFA9ySeLYU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(376002)(39860400002)(366004)(346002)(136003)(396003)(451199018)(41300700001)(8676002)(66556008)(66476007)(66946007)(83380400001)(316002)(8936002)(4326008)(5660300002)(6666004)(2616005)(53546011)(478600001)(186003)(26005)(54906003)(6512007)(6486002)(110136005)(6506007)(4744005)(36756003)(31696002)(86362001)(2906002)(44832011)(38100700002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QWxIN21UNEkvSE0zb2VSbTNVSmEyREozNnAzRExlUGJmdVZ5MS9ROTB1SnQx?= =?utf-8?B?ZjliWU5KTmhuaE9zWmtWcFZ0L0k4MitBTndwUlRpQWloNmdWQUx4YWRVeHR5?= =?utf-8?B?bm9DS0I0QVErRE5qR0tCTldnOW84WlN2OVVMR0RsMW96V3M2U1oxZXRvTkls?= =?utf-8?B?dEdKU0NUZHFZMjdMV1J2RzV6Szc1dWpwaTJpbDZiaCt0cHJiWlp0c1cyb1U5?= =?utf-8?B?dXZ0YVdmalpNSnB6YWFOeHgzRURMVUUzSEM3TWVqRWN2SGlwY0pDWldpU1RV?= =?utf-8?B?R1czZnpPeEZVRmFxZHlhNjFSNy9vSVBmQnJuSXB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q?CU+a66ZbeIXtDNJyP/t2hVzgj?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 815aef16-6d97-4913-fe7c-08db110292cb X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 16:18:15.8661 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pCh6QX62nRIZQXeqb6HtT2zCX5fEpZ6rT1DmdwC6cfi5XSVTtPSVs6dM++Ta5Gs/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7113 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 2/17/2023 7:14 AM, Singh, Aman Deep wrote: > > On 2/6/2023 9:19 PM, David Marchand wrote: >> If allocating the ports[] array fails, a crash will occur when shutting >> down testpmd since ethdev emits RTE_ETH_EVENT_DESTROY events. >> Move init_port() before registering ethdev event handler. > > Looks ok to me. Avoids seg_fault, due to Null pointer access. > >> >> Fixes: 85c6571c9103 ("app/testpmd: reset port status on close >> notification") >> Cc: stable@dpdk.org >> >> Signed-off-by: David Marchand > > Acked-by: Aman Singh > Applied to dpdk-next-net/main, thanks.