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 33C6A468D6 for ; Wed, 11 Jun 2025 12:12:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22CC64065E; Wed, 11 Jun 2025 12:12:20 +0200 (CEST) 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 DD8F640144 for ; Wed, 11 Jun 2025 12:12:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749636737; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bE6m8XybMZSs1IXnoEXlEQrTz9dsSxdCJt7J4Yr6dCs=; b=BoqbRuUMF0GDWp8h1Xfd5M5fQnkGWpQKFhNCoPJmJdFKvccK8ofoTlXqBNKfIANFZYl8UH jktw0yko1eAYs9xsd4w5WLwdaKWknQZh3gG09ETKLH6DiQdjlZNmy7vTovtZSSEK60+hE5 hhKN3zbHu/Vh6xQpH+WqJi8NzdHCing= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-185-FkbHQ4jqOb2g8MUyk37QRQ-1; Wed, 11 Jun 2025 06:12:16 -0400 X-MC-Unique: FkbHQ4jqOb2g8MUyk37QRQ-1 X-Mimecast-MFC-AGG-ID: FkbHQ4jqOb2g8MUyk37QRQ_1749636735 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-550d7bd9a7fso3313989e87.2 for ; Wed, 11 Jun 2025 03:12:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749636734; x=1750241534; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bE6m8XybMZSs1IXnoEXlEQrTz9dsSxdCJt7J4Yr6dCs=; b=KBx1Zt+1D9l5fDXGU5kjFadKsa53rvOgbtGhH+Lqk1UOymBWJWs/i2mi8aPw/TK71M gaG7I6/PHzns0sOR2/v/rPKmUcfs7WkahXG77k5F+gkyWIfiZC90RNeggrbhIXwywR2k dn0x+Nua2y8OcyXfy5BVGs3ZPG6kvTqPTnzRHqFNtD1uHs+aef7bNfWBNza220n2KrMr sUwMIhnXLj3iTYZOPhg4Goo/O4GSfJqvme1TrRX1MT3UMX/sY9DQ3JlhRuZXILewWYQT wjV7Nx/MjImM6cKk8Nig86TWtNceDHAM6Roy1cw5TIy5hd8ME+rYjhcPfjV9orizKb15 e8EA== X-Forwarded-Encrypted: i=1; AJvYcCV42xyVj+8qN3ujcVwO/PmNfcC4tNUR4TBRXjE3DIK8FwV1yOoLWP+bpK4zuzkIG7qnQH6UB2o=@dpdk.org X-Gm-Message-State: AOJu0YxPSGdSXCFRkJoATEuUyuzmpuSUmPpNuXde64GEwL9niNZd70uj iVKB1rlHagbgZu0T26+ypkvJnzkFW1k4MFeJz6WTJuiDctA5psrpT7oL9ufkMZ6/qQ1hrDrwEh5 nQU1P+LyZmIghSDTaTTBBH9WbYPg5t9FGEmw9jGhTtPYgPY+tH4XPhP3ImKHCLkuUfVs/arANa4 xisyr7+8odv1Se/rnEvbqCUAg= X-Gm-Gg: ASbGncuhRygDV9/h1sVg41xVhlLbhlpAHvPHkuxx5EuFdwbBH4oi0+c2efL7sd7sFXX BYx2PMerGJipsK27OTYGcKPxUABIy69x0DUUBV/eukeqW0XF9HpOXPXEMdJd/9bTtreC5CK/YNh 3+5rpSgA== X-Received: by 2002:a05:6512:2242:b0:553:5166:5a5f with SMTP id 2adb3069b0e04-5539c25549cmr826465e87.53.1749636734586; Wed, 11 Jun 2025 03:12:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOABgz+OVnsKPL2V4TJKLKiNa9xQ38mUy/NzFnbAMkxkCJcF3ZU8H+jX27LHmyaSDTiMMdkvSuqpGiCPRJzqY= X-Received: by 2002:a05:6512:2242:b0:553:5166:5a5f with SMTP id 2adb3069b0e04-5539c25549cmr826454e87.53.1749636734177; Wed, 11 Jun 2025 03:12:14 -0700 (PDT) MIME-Version: 1.0 References: <20240314093630.1066948-3-mingjinx.ye@intel.com> <20250513092156.1198659-1-mingjinx.ye@intel.com> In-Reply-To: <20250513092156.1198659-1-mingjinx.ye@intel.com> From: David Marchand Date: Wed, 11 Jun 2025 12:12:02 +0200 X-Gm-Features: AX0GCFvqMhXIcg2B_VPKYEM9GJY2gvbl2SfY8bgg6D7LzoHeUQD9Xxb4LS4Mw-A Message-ID: Subject: Re: [PATCH v2] bus/vdev: revert fix devargs after multi-process bus scan To: Mingjin Ye Cc: dev@dpdk.org, stable@dpdk.org, Thomas Monjalon X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -4dOQ0cUDXG6-Lg7aeWHv3h48plQ_nPZzKK8LnFrJnw_1749636735 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Tue, May 13, 2025 at 11:52=E2=80=AFAM Mingjin Ye = wrote: > > This patch reverts commit f5b2eff0847d ("bus/vdev: fix devargs after > multi-process bus scan") > > With current code, we do not add devargs to devargs list when we add a > vdev in secondary process (because `init` flag is set to `false`). > > Because of this, when we do vdev_uninit, we call rte_devargs_remove on > the &devargs pointer (the one we didn't add to devargs list but did save > inside rte_vdev_device struct), but in secondary process, because > devargs were not added to the list in the first place, devargs_remove > does not find the associated devargs in its list and therefore does not > free associated resources. As a result, we get a memory leak, because we > free the rte_vdev_device but not its associated devargs. > > Revert this patch to avoid leaking devargs on vdev uninit. > > Fixes: f5b2eff0847d ("bus/vdev: fix devargs after multi-process bus scan"= ) > Cc: stable@dpdk.org > > Signed-off-by: Mingjin Ye I see back and forth on this topic but this still seems strange we would have to revert such an old commit. Please add a unit test showing the bug. --=20 David Marchand