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 62CF045B42; Tue, 15 Oct 2024 10:39:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F10384027D; Tue, 15 Oct 2024 10:39:03 +0200 (CEST) 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 74A5B40270 for ; Tue, 15 Oct 2024 10:39:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728981542; 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=g2ozPW32k4DvkA8Tnm6h1LYVJJmqEpKNQd+ryTV9ag8=; b=LBnS23yyPE9+I5B7XRYMPewZMhLfd7V27R15IjMoGDToEscADgO1D84wohOaHKicUx51d2 KuezSJEpB3kySBGHaqS5c/19kmrqhN4ssWO27nRJpaltc1EVtcDmkdV1Dyw1rHZNHEnT2P UswDJpnZrt/58fBDOKU4V1wa5/ZcP0E= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-50-YK9MiwwOO7WpuHfoBL071g-1; Tue, 15 Oct 2024 04:39:00 -0400 X-MC-Unique: YK9MiwwOO7WpuHfoBL071g-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-539fbbadca7so1240495e87.3 for ; Tue, 15 Oct 2024 01:39:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728981539; x=1729586339; 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=g2ozPW32k4DvkA8Tnm6h1LYVJJmqEpKNQd+ryTV9ag8=; b=qOftsvKG1lppef1SVpWhp4O4qwJhComVJNEt8G+PY+LNLU9ZdQ9SzeQuYP3VJUzNtD YAj/S3PxWFty6QsBYDAdoEKWDsoWQcQBMI98548fYzpdnOLa5IRFun/mp9YfrpF1EsgM qEHYtRQQ1qfBzsshoXZHzXX9qxWJBszGMUvn0SrOzHnNTIc8sT+q/OeO03Y7wL+0YL0h 6SwXa7KHswoRND5OYtVUZCtusuo57W7vzs1FAKqvzXYHB79kpxIXHqYcfbN60lbigonQ Lzp6wdeDrnL6S3m+xC5powKO5d04SXvMMMVvANbY0TYr3LBhyQEM3TrOBeD+VSmWSYjH yqJQ== X-Gm-Message-State: AOJu0Yweu0e7Iy1oUw26x5Csj3c3qHz1ruF0aCkQLfJbkPxVG/d7vkhv EtgdeTqHBWG7MH0Z3V2rR9CaQLT6CkzSHoasYCgB2QT9aM5FBIl94SJcVlfRplcNbWkpf7m4Fka 2nnD9ryyV3CDX6yyGHVXJ5foQ3sbP3BCcAzeSLZqBSUajW1HH4R8GPI0DU/Fh0N2bizM7P7moAe kz+i2KkWXwYmlkfKE= X-Received: by 2002:a05:6512:1283:b0:53a:7e:bcc6 with SMTP id 2adb3069b0e04-53a007ec0fcmr620026e87.53.1728981538965; Tue, 15 Oct 2024 01:38:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHRSP8tVkNPiwBCXb38bRH99ACQKKwFjjbPPPNnByz7A4ofHOoera6CaUMOYfrm2BZKsHS2ldKpf0uh08uzNSk= X-Received: by 2002:a05:6512:1283:b0:53a:7e:bcc6 with SMTP id 2adb3069b0e04-53a007ec0fcmr620006e87.53.1728981538520; Tue, 15 Oct 2024 01:38:58 -0700 (PDT) MIME-Version: 1.0 References: <20241002155709.2522273-1-david.marchand@redhat.com> <20241014193237.1992382-1-rjarry@redhat.com> <20241014193237.1992382-3-rjarry@redhat.com> In-Reply-To: <20241014193237.1992382-3-rjarry@redhat.com> From: David Marchand Date: Tue, 15 Oct 2024 10:38:47 +0200 Message-ID: Subject: Re: [PATCH dpdk v3 2/2] ethdev: fix potential race in telemetry endpoints To: Robin Jarry Cc: dev@dpdk.org, Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Bruce Richardson , Keith Wiles , stable@dpdk.org, Stephen Hemminger X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Mon, Oct 14, 2024 at 9:33=E2=80=AFPM Robin Jarry wro= te: > > While invoking telemetry commands (which may happen at any time, out of > control of the application), an application thread may concurrently > add/remove ports. The telemetry callbacks may then access partially > initialized/uninitialised ethdev data. > > Reuse the ethdev lock that protects port allocation/destruction and the > new telemetry callback register api that takes an additional private > argument. Pass eth_dev_telemetry_do as the main callback and the actual > endpoint callbacks as private argument. > > Fixes: c190daedb9b1 ("ethdev: add telemetry callbacks") > Cc: stable@dpdk.org > > Signed-off-by: Robin Jarry > Acked-by: Bruce Richardson Thanks for the fix Robin, series applied. --=20 David Marchand