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 79A82A0548; Thu, 4 Nov 2021 11:09:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CA76411A7; Thu, 4 Nov 2021 11:09:32 +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 3C5B4410D5 for ; Thu, 4 Nov 2021 11:09:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636020570; 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=8m5nVsxR4PzsGkKLUTnD79Veb0JmTkKmzAulNi3uCbE=; b=K3YcJbUdS2tSJn2ni55yZWibQutBrYCR2XgrDbKN10Ne3pJefuMgKXjtefUIz8IE9MxCjY 4LCv9QkfIMBES3slHh+JWMSm0TaLajtobiP6qCe0Q+u/65JNvRg/VSopnT352YEcknRFfb SpiZtAjBIGGip9dZfTFpOrPPfRDI3Fc= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-142-JSGsfXLDOFu3HYVL3GctxA-1; Thu, 04 Nov 2021 06:09:29 -0400 X-MC-Unique: JSGsfXLDOFu3HYVL3GctxA-1 Received: by mail-lj1-f200.google.com with SMTP id 23-20020a2e0917000000b002175b5dc52fso2100159ljj.0 for ; Thu, 04 Nov 2021 03:09:29 -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=8m5nVsxR4PzsGkKLUTnD79Veb0JmTkKmzAulNi3uCbE=; b=StS+5QDTUuREwxgEabMcnBH90aKsfvDNEOrJqNJ8jp1Q4Dom4KCXiE5KZTfNJKUKcQ gZpi3ToT7RLhqEQeYrY6S2anTnI12Ernqz7iUL1kI7m4goGHGu/TXMI2y1evtJcJZYbA T9RL2ItSXUTHpvBicj3YG6GKKD3nmbDrXWhxZxHcoEq+q9Eglk+SEMonmcoIp9N9zRoy 7aaPDE665OyItjTqno444qq77WlV7fmeUqpHs7T8WyEJ9KHmWYXFgJzoNikeiquon+Ry IxW26l4R89XPUczPm/6Zx00kew6htK7PLzw9GaXWFCTvU8nELxt1nJnAGrOM8wg+V/Q5 Yfig== X-Gm-Message-State: AOAM530vqlVt4mNjevrubJSP7CvoQrbJIT1JanbaBPfn4QNZN02Lolnf MKavx8VqvkSTSDZ0pSfGLkAY0cKzN1DlXwP5qOq8HUPNaQW3/llQFU2PMAaaMVkN8jPRpUJ28v9 Ujk8mB3j4IMKpfWfb+Qg= X-Received: by 2002:a05:6512:3e11:: with SMTP id i17mr44958046lfv.560.1636020567941; Thu, 04 Nov 2021 03:09:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEEjvESDR5Pr1zoSlY62TwovfsD4ECRDu2ohOC4WNFKb27fnhr2Phix0DDnZeTVPkhWX7q7jseLAx3/b/M6UI= X-Received: by 2002:a05:6512:3e11:: with SMTP id i17mr44958029lfv.560.1636020567751; Thu, 04 Nov 2021 03:09:27 -0700 (PDT) MIME-Version: 1.0 References: <20211029121544.13298-1-olivier.matz@6wind.com> In-Reply-To: From: David Marchand Date: Thu, 4 Nov 2021 11:09:16 +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-dev] [PATCH] test/mbuf: fix access to freed memory 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 Wed, Nov 3, 2021 at 4:00 PM David Marchand wrote: > 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 Applied, thanks. -- David Marchand