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 9871EA0C4B for ; Tue, 9 Nov 2021 10:54:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 883E14068B; Tue, 9 Nov 2021 10:54:46 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 28DBF4068B for ; Tue, 9 Nov 2021 10:54:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636451684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=a+GgCuhg9fdHSBI20K6C2Bhv9uFudXN7jV32Nj3ktng=; b=Zeu6OPAlbijWCa2mWGs4KGzs3+Vmg+7UHNVBemK3zcUmEY9HTFj+IpDxGeOvgYynkhEKrs dnFBJtitQgh6g6K8f/xjq7uJ48/bm6F7U4/D5kc6r31q8glo5V+Xr5QlN/UhZAP3B+O97A x9tos1Ut9MPABCYkywMtryqatJvIt00= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-514-Wg351UbZP-eZx330-L5Edg-1; Tue, 09 Nov 2021 04:54:38 -0500 X-MC-Unique: Wg351UbZP-eZx330-L5Edg-1 Received: by mail-lf1-f69.google.com with SMTP id bp10-20020a056512158a00b0040376f60e35so2315400lfb.8 for ; Tue, 09 Nov 2021 01:54:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a+GgCuhg9fdHSBI20K6C2Bhv9uFudXN7jV32Nj3ktng=; b=559XR/PdlZUKJh23IFjuCre/Y17kh+q0iGcqtSaqyFW1Lqlvz4jBeWkxY9OfW+j/4E cfS4CGoQ8VHY2Pg+qg+iR2PLbttWV9aoftKEBMcQd+Q52VdI1M8kWWuENAEsM099jgcU RDX9wZaoh6wIZmKajBXuCkvDgkFLliZQ+iqJ2cQ/hJrNpHWBQUbqTBjpYJhI4Q+oNXsR 2ChZt/DtJ2s+uR7B9lWm2NCf28Ezd0xa0zWQqd5p0MaccL6Q8UuTIu//x33xRFM/cs+d 3+1Qg6EptHrV2nrSwsPTD0fHKmP0SMDQBrR97wTXlhHN6Eb+5zfMhmE0TR8SXOrrnf68 9YGA== X-Gm-Message-State: AOAM531Q/v1hL+qlY63arPWuEaddCIHoIRDkqDLxVxicJqi4ipfEIUrD gWTi54ouxrN24mZEfyLCIbHACno0OxpP0UkroA36aIGeTVH8BEcCTqe5X6/5E8uojjU/kzk11JN xh4gPXkVlINeR1uTinbWfupY= X-Received: by 2002:a2e:96c2:: with SMTP id d2mr6044688ljj.46.1636451677060; Tue, 09 Nov 2021 01:54:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrkAEusSyLXawQDGSJJ6dOtC9DmH6wDM+xbvE6eeofD6aQhHuMmmSDvq+lOd5v6m0ovmnsc2miQh5Iqq9oNw8= X-Received: by 2002:a2e:96c2:: with SMTP id d2mr6044668ljj.46.1636451676879; Tue, 09 Nov 2021 01:54:36 -0800 (PST) MIME-Version: 1.0 References: <20211109073334.3910034-1-s.v.naga.harish.k@intel.com> In-Reply-To: From: David Marchand Date: Tue, 9 Nov 2021 10:54:25 +0100 Message-ID: To: "Jayatheerthan, Jay" , "Naga Harish K, S V" Cc: "jerinj@marvell.com" , "dev@dpdk.org" , "stable@dpdk.org" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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" On Tue, Nov 9, 2021 at 10:24 AM Jayatheerthan, Jay wrote: > > -----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 > > > > This patch fixes heap-use-after-free reported by ASAN, > > please reference https://bugs.dpdk.org/show_bug.cgi?id=869 > > > > 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. > > > > This patch fixes the queue_del api to use correct number of > > queues. > > > > Bugzilla ID: 869 > > Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") > > Cc: stable@dpdk.org > > > > Signed-off-by: Naga Harish K S V RTE>>event_eth_tx_adapter_autotest + ------------------------------------------------------- + + Test Suite : tx event eth adapter test suite Port 0 MAC: 00 00 00 00 00 00 Port 1 MAC: 00 00 00 00 00 00 Failed to find a valid event device, testing with event_sw0 device + ------------------------------------------------------- + + TestCase [ 0] : tx_adapter_create_free succeeded Invalid port_id=2 EVENTDEV: txa_service_adapter_free() line 743: 1 Tx queues not deleted + TestCase [ 1] : tx_adapter_queue_add_del succeeded + TestCase [ 2] : tx_adapter_start_stop succeeded + TestCase [ 3] : tx_adapter_service succeeded + TestCase [ 4] : tx_adapter_dynamic_device succeeded + ------------------------------------------------------- + + Test Suite Summary : tx event eth adapter test suite + ------------------------------------------------------- + + Tests Total : 5 + Tests Skipped : 0 + Tests Executed : 5 + Tests Unsupported: 0 + Tests Passed : 5 + Tests Failed : 0 + ------------------------------------------------------- + Test OK And no ASan splat. Tested-by: David Marchand Thanks. -- David Marchand