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 25BBBA0C53 for ; Wed, 3 Nov 2021 16:01:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BABB40E5A; Wed, 3 Nov 2021 16:01:13 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 096B941C26 for ; Wed, 3 Nov 2021 16:01:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635951671; 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=IfwrhJxe72slH4vFK5Lx2d5ZPcdC9wQ4RwToMbZ5DPY=; b=fCPHQp6ve/KcZxpznIkoPRwgdJ4ZsyCmJeHpkefAAO8pPpJTaP6VLm3t6j0iz/92EgvKh4 gEjHDa3AIoaXfObUZwMgJDw92SfXlogswCcj0dNGOG2vN3gKz0OCzt0Vs/jKZAUo50sjK/ Upt8cYhB8F1SAzlMRiIIVQ2NnOHk0pY= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-559-KkCE4JeAO6SzJx4Y5NGp4A-1; Wed, 03 Nov 2021 11:00:39 -0400 X-MC-Unique: KkCE4JeAO6SzJx4Y5NGp4A-1 Received: by mail-lf1-f72.google.com with SMTP id d10-20020a0565123d0a00b004002359a671so734299lfv.10 for ; Wed, 03 Nov 2021 08:00:39 -0700 (PDT) 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=IfwrhJxe72slH4vFK5Lx2d5ZPcdC9wQ4RwToMbZ5DPY=; b=Y0Io8TO465rWLAHWU9bEb8gScxF32G6+HALV++bd8mkvvEi12yjbVWsko5+QeAKtfK 2o22zEu8FrN/4jS4MAPtlrLBVjzk/Duvs2x9aRVHWip1MTd4Wrzbl4m1Yf0EiSqxJ343 o5srTzVckbNiUU/e9NIbkTgVIqSY6y30Q2WFEru3n2thBePgHUhfsLChQve7iDdiaN8B kNUDr2GTR7cS2fBG5LQKYUCnUmKFGGgv07DzO541c/Myfhn91AqStmnItqEUKhe4WOVC xQmCbLQ58wpdTYiMB4aKMdmycsPoRZ7Ou+mN5RReMTAtVMHSnvt5nx7/SoSYZu5GCcdf +DqQ== X-Gm-Message-State: AOAM533IqMefawgJEK1cI1cmOHRe/FU7eyiPiK3mixPpu8RoHtyY4ULw 2mwmYmPCjJzeDub8l7umtp+6X9cUO5IgUgdGAexLT4a8q8LPbysEjN3Tq6ZTAk6RjBZQ2O5Cq+t hzNCrvs/IkN4kV+GLIMyiDWw= X-Received: by 2002:a05:6512:3e11:: with SMTP id i17mr40059183lfv.560.1635951638383; Wed, 03 Nov 2021 08:00:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAqXi1jzurgeqcnviQl2hpTsrY8lYGOFf1MgI9vcrpaRTZEBjZJ+zyUHms5PRACNkci6Hbeq+tX1X7xZd7Bb4= X-Received: by 2002:a05:6512:3e11:: with SMTP id i17mr40059161lfv.560.1635951638183; Wed, 03 Nov 2021 08:00:38 -0700 (PDT) MIME-Version: 1.0 References: <20211029121544.13298-1-olivier.matz@6wind.com> In-Reply-To: <20211029121544.13298-1-olivier.matz@6wind.com> From: David Marchand Date: Wed, 3 Nov 2021 16:00:26 +0100 Message-ID: To: Olivier Matz Cc: dev , Lavanya Govindarajan , Reshma Pattan , dpdk stable 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] test/mbuf: fix access to freed memory 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 Fri, Oct 29, 2021 at 2:16 PM Olivier Matz wrote: > > Seen by ASan. > > In the external buffer mbuf test, we check that the buffer is freed > by checking that its refcount is 0. This is not a valid condition, > because it accesses to an already freed area. > > Fix this by setting a boolean flag in the callback when rte_free() > is actually called, and check this flag instead. > > Bugzilla ID: 867 > Fixes: 7b295dceea07 ("test/mbuf: add unit test cases") > Cc: stable@dpdk.org > > Reported-by: David Marchand > Signed-off-by: Olivier Matz Reviewed-by: David Marchand -- David Marchand