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 F2D0045B43 for ; 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 E868240647; Tue, 15 Oct 2024 10:39:04 +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 1D41B40270 for ; Tue, 15 Oct 2024 10:39:03 +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-36-Y67Y0qWCORKiWOkk0eyKEA-1; Tue, 15 Oct 2024 04:39:00 -0400 X-MC-Unique: Y67Y0qWCORKiWOkk0eyKEA-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-539f49f23ddso1248678e87.1 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=lsxiGc2VYi7qA3Uvd8BILoaQjrZviMxwxUQTzv0jZ0VCXUmO/0mhgqkOxY4osMaxpq YgvkBbeUMdruhSXaxzzMcUQAcEhX8sxXqd5ADBQ9LTzqCD3ijhyQ6+eB1dEa0MTYaZl4 Mnt3ilnsShQ6GRr+EI29y0oWjxEe5Vd3Vdy/ljq6E/GgWkXrK1ZBoZyYdiozscxRcxKl cIr4Fm4qOTI8QkHyCL7i306k/GPIVezgxHbvj8eJXhASLD3XT4u/ubcP/3o1MArC4xaD keM/lY9z9klZYJ9VQnDCKQeWZXXoseWT7+bHLF70R8Xdb47TrgKwvwYTiuqNkBm41L/S wg2g== X-Forwarded-Encrypted: i=1; AJvYcCXoPZ0FaPHSCzsuVLapCE876nsM0eCe2m/KyKteMAWSjftdd6Mdza8XhC97oJETuprhOCuCxWo=@dpdk.org X-Gm-Message-State: AOJu0YzYABoJIEPmfbI5uF+ni36e++7/9S2RJE6PKdkjxf8/W0KG5osT vfWNlubCpyTEF1ePHevk0+nP0v3wCcMol2QPK6A/IByupT4UMw1F2gvIwkaO0U5NAfJitGgNBRw jgY7cZUsIJ550sJjBFcZSaQGzP0aBKaBw1KWUi3mQVvuxbD+7ry8tvaXifBbf8RGFxKg8yV6EbZ 6zFuBEswuFbwXQ4XKoZq4= X-Received: by 2002:a05:6512:1283:b0:53a:7e:bcc6 with SMTP id 2adb3069b0e04-53a007ec0fcmr620018e87.53.1728981538960; 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: 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 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