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 CCC90A0C4B; Tue, 9 Nov 2021 10:54:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC35640E28; Tue, 9 Nov 2021 10:54:48 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 920B2410F2 for ; Tue, 9 Nov 2021 10:54:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636451687; 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=JfGvrrTdgeNj3XyZzulPJadGbGrFQlipHQgp0MGns4YWKUeyHaRKlLhw7W4DzrzgJP746G REGlFQiy23ccSEYLxVWxdpKYLoFkaBX96gt33fYpkPLz1QbCPdND5ZGJaZJujfx1cYF4jB AQcqqcac112ckaTriZRXvvnOIYl5rI4= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-287-5m91eyz6PXWutzjNHD5nrg-1; Tue, 09 Nov 2021 04:54:38 -0500 X-MC-Unique: 5m91eyz6PXWutzjNHD5nrg-1 Received: by mail-lf1-f70.google.com with SMTP id g38-20020a0565123ba600b004036147023bso3958644lfv.10 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=Mp2rCf68rwY4iQamqXbgxnks0QKpIR3trCr22bbEpmeUN6o89VDpjfkkP7nR5LOx/c VXmkQQS4zpNT8Ie6qlC4gPsmtqLgnMmReyvlMH1NoB7odChdZ5K/yTxQkvrCi8vwLCz+ ORoUtWyIYJkXezo7JvZzDqod+RY8zSJrgMRK9dBB4UicEf6NWLgFNp3vaWo9AUzy6jkK FYlM1aVYh2NuX4JIclPXh3Y011iVincIZKGoNYxWZ6+YXL+v7nJSWDu9spvAXlEl5c1c mjFlWWUXg3L3UyJO1s8jJKnJimM9VndeBts2MfbabK3oZw5FyR29U+AWTKngEQF9Cyc8 TRJA== X-Gm-Message-State: AOAM532MoHz0fYWi4khNsQiWOMWRA815SkjXtvfwR1kuUPdYuSY6Efof +BTKdN5P0GMw5X/M9SrL+9cbSowzzBMqvWICvhT1v/ut6WgB/laWYG1u878sSsHsajAfQnhmwGD gmM7qKNfFw4bqaIqEEZY= X-Received: by 2002:a2e:96c2:: with SMTP id d2mr6044697ljj.46.1636451677176; 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-dev] [PATCH] eventdev/eth_tx: fix queue_del function 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 Sender: "dev" 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