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 D1EE4A0C4C for ; Tue, 9 Nov 2021 10:24:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C189941103; Tue, 9 Nov 2021 10:24:39 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 44B0A4068B; Tue, 9 Nov 2021 10:24:37 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10162"; a="231132060" X-IronPort-AV: E=Sophos;i="5.87,219,1631602800"; d="scan'208";a="231132060" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2021 01:24:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,219,1631602800"; d="scan'208";a="731745523" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga006.fm.intel.com with ESMTP; 09 Nov 2021 01:24:33 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 9 Nov 2021 01:24:33 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 9 Nov 2021 01:24:33 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.103) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 9 Nov 2021 01:24:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lnoa7JReVXELqJVJ4Y4YOdyuMNgXZIyXLCTb5lsDvTt00QZgtfadKi2cQGSJGQ9lAjkfk/uNbuNBQAjCokyjgsaNHvA+Zs5lYJcmcVTorLHktel98rrM2D0v/DS7UsoFdmfLR3N/fNFE1o58PXxaM3zwp1MAvhwXOmrWyrSNJcghavmVOglbokFvVZtG5Jv5uhRTh9kBASeH/EyUf5/zpZPFpvkzRAjCyE8aiKHTP5A1XFC/i87+oHLmp25MrLWFbej0AhvMiPi4GPXwsPNcXEbkWAi6+gk54/UHZGsEpkJOAQpNG2BLxA4XErWW0/J4f32oeCE4pomgqSyeDzVWfA== 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=uYTi1HBv7iAKSOhJ8uoqRB33TRSt82EkUHAPBJl97Rg=; b=Jjd7WVlO3S49O/1zIretjjXNZVO5mL7+iljCsacEy5oUrUyS4O+tNbmUGA6UqUBwX7sYpCg3ufXGE1j61fPm52DLFB0wqluDe8InXb6CK7Jgv3k4H7yJM1qHFzWNTAoAXjD+V4p0EIu2+3rk0wwiA4rxtOP1YuMJXJLBf1F8OViqMdYK8n/Drbxe7Bw+8ndmJ8lc5cVI//k4gTCvkrqo/4M+dnN2VB2tS29R8tGrx3N/NU7v7QX7SN8dzyQB97PdcIJU6QfOqIMQNy5DVve6JHud4PGEitMOISom9NQFSKcoQl2j+Fzp434nOp2JprJmQk0yDbFLqpm6qkqfhmTRdw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uYTi1HBv7iAKSOhJ8uoqRB33TRSt82EkUHAPBJl97Rg=; b=SHSkJENz/pVOKUsWuSTvBn4I6j+TAd92GrXeq+KifEN8V4RwQ5DQWL6X+YEv1Ho0AopNNytL2F3JTndLFIi1YPiOBM4xDFiw3kJGM5PzUar06wvl7sAUhWNmsNz9jhAAtdzuK/jza0E/BfXbZwJNpQWnIt0uJo/k7IO8Pto/vmo= Received: from DM6PR11MB4348.namprd11.prod.outlook.com (2603:10b6:5:1db::18) by DM6PR11MB3481.namprd11.prod.outlook.com (2603:10b6:5:8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Tue, 9 Nov 2021 09:24:32 +0000 Received: from DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::e00e:1103:ed26:7d97]) by DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::e00e:1103:ed26:7d97%6]) with mapi id 15.20.4669.016; Tue, 9 Nov 2021 09:24:32 +0000 From: "Jayatheerthan, Jay" To: "Naga Harish K, S V" , "jerinj@marvell.com" CC: "dev@dpdk.org" , "stable@dpdk.org" , "David Marchand" Thread-Topic: [PATCH] eventdev/eth_tx: fix queue_del function Thread-Index: AQHX1TwgIz7PKHKVx0yLjijzN1JBpqv67Bzw Date: Tue, 9 Nov 2021 09:24:32 +0000 Message-ID: References: <20211109073334.3910034-1-s.v.naga.harish.k@intel.com> In-Reply-To: <20211109073334.3910034-1-s.v.naga.harish.k@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4710a581-048b-4199-09f4-08d9a362bd08 x-ms-traffictypediagnostic: DM6PR11MB3481: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:595; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cqRznBDRejia+iWZJqp7MmMaSxWZswUxpofiNOBo2Wn5PSqUYHEsS6rEGbLgX9Cty8jx7O5nBZDcoeQZqlfd8kbJImciBmZ9Ziuc2KJqU7vLnkKaTq5v+T8BSj4e8kqlwELCl75Djcpb2JmnBsPV+jqDWWqbcSCcqOhJ+P9eUcT9tRRAg2q+T1X4vS/36sNp1PgCcXvyL11ShqAybroti+yiEOGHpl5IZ40T4AcBo2ohVxriIpqeaEMa6tJmywvW07GeVQqf1CX7toFJR1DT6bDA3kvkgg7UIzvjZ3XmDHntq00k+hHmcf8be5xCwRzZbRpmKZEeh65+X7OHbD0b3OF8imyPEBKWdQ0WhIHeTEDrXugIWLtW9CuWHMh+MIYr1x42PyKlREPbNckMCdlMIcHvb4iYFDpHgRrYkweqGcc0JWuyS6s1b1dbmG+k00yRBlEnf9/DnVymZq9KGJoCrgP1pxo18+Av53vKAenswJt3Eko2+89njRI54i0coPBcglflPeVLeCqTt4WHAUHMI5TiWdF6hX72FJYVsM66GgZri/s2QLxd5Es3zN5rBWAjkYK4/qYxP0WHeL3iasvdAcL7gtJtUeySBGsRdaRDAJwUbSwNLZWQv1e1UtQ2slvhAZDja7t+yHef2bLzL0jJkPcJSqB8hOg+CaNv+48ldkoLTKDNvWqsXQrAjXnN2LgmbfMXskmfhEkN3qVFc1eYgRKMytvxMK1kxwVwc3nho8CDCNLzh8XpTkOXDZXPazbleg2gBU/9umpSJTZpTqFp80hPMwxisYmz1pgI/WFuJ9U= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4348.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(508600001)(66946007)(66476007)(66556008)(76116006)(8676002)(9686003)(2906002)(64756008)(66446008)(966005)(55016002)(83380400001)(52536014)(26005)(54906003)(186003)(82960400001)(5660300002)(71200400001)(86362001)(110136005)(53546011)(33656002)(38070700005)(4326008)(8936002)(38100700002)(6506007)(7696005)(316002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?foxJgTGKs6qhMNnk1/OSQyVV1vCNFSFp4eFIqfikJ+2+qEVf79aa129LxToy?= =?us-ascii?Q?oZGsHsyyGjUWxWESxGtd79cOftLfP8KFmkDD9lHGNdV7qni0b3kavgXYFTUC?= =?us-ascii?Q?qpIsMS4cxPLLKMkUlSjYtPRtxGLHhatE4hZN27XtU/UWb0X0MCZ2KQn2z1jW?= =?us-ascii?Q?Ql6azY4kZ3XO7CZu64EbCkEP1EnG5gavuMI8qlnM4xszqYptLAW6Hyo0sA61?= =?us-ascii?Q?r+rXqUTWlfpvvMFUupqi7R9A3y1IIcZ1gN1zAQ2yCj3rVfl5DOvri38TWhFU?= =?us-ascii?Q?5OWYGfwT+hI5BnEPLezyMEB16i9rybzR7wIHpX4K+omDjYZAO049jkuAW8Dk?= =?us-ascii?Q?aD0dMijo9yTcqr4GPPtIAokeeHK0FF/ySlMY7uNeAicH+yPa9Lv9gQrACYR1?= =?us-ascii?Q?hkEmFmejtSu+l0YdqMDt3tdDjpw3WAO3Y+HksPdZ7ywbRidpQJsvZXqx3MWa?= =?us-ascii?Q?zFGKXCbjv+1D3vwI69A5wTjnTyrHOm5C9OI0wHATwNd1mNVBgVi0fNhpW5gN?= =?us-ascii?Q?nfLjnKydwegOSRW3i2zCKEp66CPuzk1lRyoFN+YERFMvOr8Wq5vLKx7IGh/p?= =?us-ascii?Q?PeDaacaGI6Q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= =?us-ascii?Q?aq1t8+Sv1TBfU1tIWZo6+m0Z7dO/qtTi9L8xeNExt/k8v2tU3sVWzbe78bjV?= =?us-ascii?Q?ZRgNX0sVPDNArJQHT8hH1oUrU7p+adfkpY/OKYoGh2uXiPRrO/RuXVBAHwb0?= =?us-ascii?Q?NtH4cgJ5ERTFxu1gA09fyi49mNgrOJycI4cmDJPDAH/8fa1KBB95+rwfhg7g?= =?us-ascii?Q?PqoN3Q=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4348.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4710a581-048b-4199-09f4-08d9a362bd08 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Nov 2021 09:24:32.1939 (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: z298o4GJ3JYUxegJNB2U5Acj6o2cgU6jVdO9q3kK+v9R5yLEvhvFbGa+FAGMxIDFXAw7cBXMdIaJR1xgccu3S7bU0yJhOhd0w/O30xwRw98= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3481 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH] eventdev/eth_tx: fix queue_del function 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 Sender: "stable" + David Marchand, who reported this issue. The change looks good to me. You can add my ack. > -----Original Message----- > From: Naga Harish K, S V > Sent: Tuesday, November 9, 2021 1:04 PM > To: jerinj@marvell.com; Jayatheerthan, Jay > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [PATCH] eventdev/eth_tx: fix queue_del function >=20 > This patch fixes heap-use-after-free reported by ASAN, > please reference https://bugs.dpdk.org/show_bug.cgi?id=3D869 >=20 > The application can use the queue_id as `-1` to delete all > the queues of the eth_device that are added to tx_adapter > instance. > In above case, the queue_del api is trying to use number of > queues from adapter level instead of eth_device queues. > When there are queues added from multiple eth devices, > it will result in heap-use-after-free as reported by ASAN. >=20 > This patch fixes the queue_del api to use correct number of > queues. >=20 > Bugzilla ID: 869 > Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") > Cc: stable@dpdk.org >=20 > Signed-off-by: Naga Harish K S V > --- > lib/eventdev/rte_event_eth_tx_adapter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_e= vent_eth_tx_adapter.c > index da55d2c2dc..c17f33f098 100644 > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > @@ -864,7 +864,7 @@ txa_service_queue_del(uint8_t id, > uint16_t i, q, nb_queues; > int ret =3D 0; >=20 > - nb_queues =3D txa->nb_queues; > + nb_queues =3D txa->txa_ethdev[port_id].nb_queues; > if (nb_queues =3D=3D 0) > return 0; >=20 > -- > 2.25.1