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 9832C489EF for ; Mon, 27 Oct 2025 17:20:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 69EF14028B; Mon, 27 Oct 2025 17:20:17 +0100 (CET) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mails.dpdk.org (Postfix) with ESMTP id C09C64028B for ; Mon, 27 Oct 2025 17:20:15 +0100 (CET) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-475dd559b0bso31570915e9.1 for ; Mon, 27 Oct 2025 09:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761582015; x=1762186815; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MCfcwobY5a13+9zErcEhz79BksDJcm5kkWYVi4zccqE=; b=LmYJ8lwghENoDEUXNGhfuuvyacToFrDukLATrXhFi149cgOoXr9gZ3Jtoi0uM//vv2 O/nsiifTWWwcZsfiEhGiu6zv/kFmwHZwVUcdixG5l22p9x1fSZVCyi7r4CgP6R4BlvA5 2sneXEZ8Kz/wKfwENMJDWYpi0CPLXIyHHID1H3rWKeNwXEk9L7ai3ZYcpSrBbzIzoMVM 1LSod/I8khbYCnW5Ez7yJo8Q9x6JXfct/7nXoUV0oz1zNKHAQiFZY73QyL6VozPTKbCB INlSAMRLbCm6oOtXUYS+ZnPXSdC0i7G9wjluxoDhcICQb3/I2D67OK5wQDSW/xRpSC+d e/Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761582015; x=1762186815; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MCfcwobY5a13+9zErcEhz79BksDJcm5kkWYVi4zccqE=; b=aGbctcxqHihFl30G/ECfJkePxM7IOmwG4kMuZ3SstGzO1SSBnp3maSG2st6TgvpHBc k+PI0PVEDgxB/p+WsPbHX3L7ydmcbil9PQ9nxX80w924RkAXeGquz88tRvjEreBpluOk l/ByB5tQSm0rJZPqaBJ5Xnu7gyc9CRd1rvgQ1Tg87i4hAySTkDO7zA72KnoAgsyzfjoc BfEsOusNssTOOlB7wdj4lec/Rojxi6mlE7t0upSEx/eW9GTllsJeUvkjf1RtfVYL4fFN iU/tcu+GXvhm6y57KHNkmmVQo/3Qvci4mDxeRYsRRmsViqDZeq4M3TSxatyHb+FZHsp5 jDhQ== X-Forwarded-Encrypted: i=1; AJvYcCW+27iMJEKC2YM2DA1NYd9W8NZ0dwqK+HIi5oTIn87dSAptr9XX6WymMkZkr3Pl0/bR2PbO9Wc=@dpdk.org X-Gm-Message-State: AOJu0YyeCxoUZY8lNJivFFpe4um4CqRJmPxm1Mn/I6lT6YcvPQ7lNlfQ 3/UtldBExGHJnzfTL1mSZpeFCPc3Q+LYMPMnO+hLioUUOizTdO9Awm9v X-Gm-Gg: ASbGnct/43wkN5COZUBsJnt1gNRWLj/1rNyhoXc3+WePYOv8ur8iprnVlXOpno6+AqZ 8VWawKh+XVy7DOg0uOzC4hTgsqT1eXgTKWwxzdcx72RYONFF5zXRDxuTPmq/pr+m3D5ebb2niAp 5ztM9KqZDx5EG55766AA63VPFuuwXxe+yj6VVQyR2hXmig2YWzjQoJU0mQBh0lQ1QaKojpTWeaz Sbxk5ydk0ocalSmB45hCRQa8YKlXEYxZco83ANruwv64d0SYvkNd8uSmwD0Fn9c5CdTTT2b8cR0 iSwhEuWQNzBsMRr7vP9xO/DXn2Yu4gOs+bwASHV4QDBfZt635b4kAUrDb19f4hiWi+KYoM01SE+ sAqmD4+7SflRKqenbxv+Nbf48TDm7b7pJ5zW7ei/yLEiiDWVaVefBTioo4QzqPK2jPB64Kvt4Hw zgY0D06w== X-Google-Smtp-Source: AGHT+IECIE2Q+8K0aIfUSANRpqLfN5r0bF66WXYv62r4ZdCrTLvnKEBoWcUms5S9fK9IiHvLLpTMBA== X-Received: by 2002:a05:6000:1847:b0:3ea:bccc:2a2c with SMTP id ffacd0b85a97d-429a7e35c49mr285805f8f.11.1761582015214; Mon, 27 Oct 2025 09:20:15 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:6fc5:c3bc:147e:832c]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-429952db80fsm14713138f8f.31.2025.10.27.09.20.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Oct 2025 09:20:14 -0700 (PDT) From: luca.boccassi@gmail.com To: David Marchand Cc: Chengwen Feng , dpdk stable Subject: patch 'tailq: fix lookup macro' has been queued to stable release 22.11.11 Date: Mon, 27 Oct 2025 16:18:43 +0000 Message-ID: <20251027162001.3710450-5-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027162001.3710450-1-luca.boccassi@gmail.com> References: <20251027162001.3710450-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 22.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/29/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/315102b82aae7bb6dc5bbf31f129d073994e30d3 Thanks. Luca Boccassi --- >From 315102b82aae7bb6dc5bbf31f129d073994e30d3 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Mon, 3 Feb 2025 17:09:54 +0100 Subject: [PATCH] tailq: fix lookup macro [ upstream commit 5d2d4033abe5bb17f6e328fad1a615553573abd5 ] Doing arithmetic with the NULL pointer is undefined. Caught by UBSan: ../app/test/test_tailq.c:111:9: runtime error: member access within null pointer of type 'struct rte_tailq_head' Fixes: f6b4f6c9c123 ("tailq: use a single cast macro") Signed-off-by: David Marchand Acked-by: Chengwen Feng --- lib/eal/include/rte_tailq.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/eal/include/rte_tailq.h b/lib/eal/include/rte_tailq.h index 0f67f9e4db..e1d8d15c8d 100644 --- a/lib/eal/include/rte_tailq.h +++ b/lib/eal/include/rte_tailq.h @@ -70,11 +70,12 @@ struct rte_tailq_elem { * @return * The return value from rte_eal_tailq_lookup, typecast to the appropriate * structure pointer type. - * NULL on error, since the tailq_head is the first - * element in the rte_tailq_head structure. + * NULL on error. */ -#define RTE_TAILQ_LOOKUP(name, struct_name) \ - RTE_TAILQ_CAST(rte_eal_tailq_lookup(name), struct_name) +#define RTE_TAILQ_LOOKUP(name, struct_name) __extension__ ({ \ + struct rte_tailq_head *head = rte_eal_tailq_lookup(name); \ + head == NULL ? NULL : RTE_TAILQ_CAST(head, struct_name); \ +}) /** * Dump tail queues to a file. -- 2.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-27 15:54:35.042830494 +0000 +++ 0005-tailq-fix-lookup-macro.patch 2025-10-27 15:54:34.719947643 +0000 @@ -1 +1 @@ -From 5d2d4033abe5bb17f6e328fad1a615553573abd5 Mon Sep 17 00:00:00 2001 +From 315102b82aae7bb6dc5bbf31f129d073994e30d3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5d2d4033abe5bb17f6e328fad1a615553573abd5 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 89f7ef2134..e7caed6812 100644 +index 0f67f9e4db..e1d8d15c8d 100644 @@ -26 +27 @@ -@@ -69,11 +69,12 @@ struct rte_tailq_elem { +@@ -70,11 +70,12 @@ struct rte_tailq_elem {