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 55FB046B72 for ; Mon, 14 Jul 2025 17:13:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5147B400D5; Mon, 14 Jul 2025 17:13:02 +0200 (CEST) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mails.dpdk.org (Postfix) with ESMTP id E04FF402F1 for ; Mon, 14 Jul 2025 17:13:00 +0200 (CEST) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-45618ddd62fso13242875e9.3 for ; Mon, 14 Jul 2025 08:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752505980; x=1753110780; 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=Ojc9xsmhbqsaikQ8EdnSYFUvdfqDasjUkHOUrCEwiUI=; b=a63OjUVy1xbGrSagxJl5jp2xU2M4uGpBw94lFlNnmQ1a4m9/ISVMjJ47O2NXJ8ojw5 6CQhY5R3Q2+Z1xjuQYdCQEKhdp2RDO6vYt95Ygooeq6xeDxTmijpBHNCElfyXi/KInPn 809+sd6MaoCbZDTmw9DwIDZDdAbv0siykSu2vdSVgQ5tkzQzSxMNJ11/VNk0m/OWUaFG VCRtydiv8iJ5P9iuFy7ZZMOhkhaQSytcJGT9wflPqHv2x/vukgapZqrf5+0c4DPkB34Q g4RstmiuimcXmRcViyu6YujwstqKUTBxucHSxy2e184qopOs+sBum2BINO+zRBAxoMnn X5dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752505980; x=1753110780; 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=Ojc9xsmhbqsaikQ8EdnSYFUvdfqDasjUkHOUrCEwiUI=; b=HP85jq902VtSm5svTNjQl4D2v04lGC++EjaMxwo1P3TGYS1sGTmI3vJbjbjFfviN7u gdHJQwyDMMt3yas57UAClcBVjJm1x8HfOVZF1mHTyroP5hky6NY/58irOiwBKeP2Nkx6 3RbzRAVaTeXjIMu0jDrDM++AZdVK5VWsQpu3YOlnTSJWTOTuDwQIDfS2K6GGA20ZML6d +K7jUk6u8a5I5ExFBs6Zk7ElMB9ns6WRJj07Sj39Xyf1vGGJInsWx+aUPzq0i4HRb/No ClYGKCzQxJZRs4r72+Ij3EDmGideZ1cw+V+z8qaT+tZqI/fNobDfTTGp//KrhPB8mXl6 Y+0Q== X-Forwarded-Encrypted: i=1; AJvYcCVFXJi9B1Wlqtzdxc9erEHqqABsP7L3brfkdKd9aM9c/YOfQvr2TIXCaGeJcNo7Lg0HWBOvIn8=@dpdk.org X-Gm-Message-State: AOJu0Ywfedy1rRChfr5eDk0/c6WbIQVzyyxNudsqLJcbqILPSMb+YiLY k4x3j+J/QBBYHgIKgxaLiQOb8yiIyS/5yLN/A+HbyZkdpXW6fUxNBkUd X-Gm-Gg: ASbGncvDYFvYVw2m/lL8Y6djdCOUkmB6SPPMbtT1SF5GA3HHvxkrZ5mqkJHu2MH+aq1 CfO/IMrIf61yPDQNkh8OLzzoc3n9oc0UMaD6wQbg9vG0kzYH7p5P4a974cwP1LxNptcE5N5JXIy uqmIDJxt19s70IkyEVuacv7a/PuQydGLkKfbGHYpWz/WaTDWTJtihCgfY/YxxBkaL0gzGefmFO5 lAw4NlqnFThrhgmjxX0f0/N50z3ooZc5+q0J5Sng8eWaHMWpMHD7kkUy1q6ucvs0PuZoRMsJp8h x8reMC6oO0hxOLD1rYV8OGWD0n0YReoyneasIGcCJ9KodBk5YwA/zlDIbG/HDZxXyVtx+mgxoRA 80VMnmBdpN86nkKSlUnTV0Q4CXnW9 X-Google-Smtp-Source: AGHT+IGjG1e1wZLBRHB54AW26v7f5WYFeAGIzhEp+714S43zT3AmBZSCx8U2+9Ec7i1HKF3gLyqQjA== X-Received: by 2002:a05:600c:4693:b0:453:6b3a:6c06 with SMTP id 5b1f17b1804b1-454f427c32amr114712365e9.29.1752505979958; Mon, 14 Jul 2025 08:12:59 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:a923:75e5:f97f:ef33]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3b5e8bd1833sm12345512f8f.8.2025.07.14.08.12.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jul 2025 08:12:59 -0700 (PDT) From: luca.boccassi@gmail.com To: Gregory Etelson Cc: Dariusz Sosnowski , dpdk stable Subject: patch 'bus/auxiliary: fix crash in cleanup' has been queued to stable release 22.11.9 Date: Mon, 14 Jul 2025 16:11:12 +0100 Message-ID: <20250714151121.219866-17-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250714151121.219866-1-luca.boccassi@gmail.com> References: <20250630122556.1133654-23-luca.boccassi@gmail.com> <20250714151121.219866-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.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/16/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/5b3b2e64eec9a6f07ba2cd4001eb769065bdb8b5 Thanks. Luca Boccassi --- >From 5b3b2e64eec9a6f07ba2cd4001eb769065bdb8b5 Mon Sep 17 00:00:00 2001 From: Gregory Etelson Date: Mon, 7 Jul 2025 13:06:48 +0300 Subject: [PATCH] bus/auxiliary: fix crash in cleanup [ upstream commit f03c01f601b1b8d90f62c8a5acead72c04797d7a ] DPDK auxiliary bus first creates a list of known devices in the `auxiliary_bus.device_list` and then tries to attach a driver to each device on that list. If the driver attachment has failed, a device will remain on the list. The device destruction did not validate driver existence and crashed. The patch validates auxiliary device driver before accessing driver related resources. Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus") Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski --- drivers/bus/auxiliary/auxiliary_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c index ff1369353a..c8f38b7784 100644 --- a/drivers/bus/auxiliary/auxiliary_common.c +++ b/drivers/bus/auxiliary/auxiliary_common.c @@ -160,6 +160,8 @@ rte_auxiliary_driver_remove_dev(struct rte_auxiliary_device *dev) return -EINVAL; drv = dev->driver; + if (drv == NULL) + return 0; AUXILIARY_LOG(DEBUG, "Driver %s remove auxiliary device %s on NUMA node %i", drv->driver.name, dev->name, dev->device.numa_node); -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-14 16:09:41.335456597 +0100 +++ 0017-bus-auxiliary-fix-crash-in-cleanup.patch 2025-07-14 16:09:40.716449076 +0100 @@ -1 +1 @@ -From f03c01f601b1b8d90f62c8a5acead72c04797d7a Mon Sep 17 00:00:00 2001 +From 5b3b2e64eec9a6f07ba2cd4001eb769065bdb8b5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f03c01f601b1b8d90f62c8a5acead72c04797d7a ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 5c6c6b0ef2..ac766e283e 100644 +index ff1369353a..c8f38b7784 100644 @@ -31 +32 @@ -@@ -163,6 +163,8 @@ rte_auxiliary_driver_remove_dev(struct rte_auxiliary_device *dev) +@@ -160,6 +160,8 @@ rte_auxiliary_driver_remove_dev(struct rte_auxiliary_device *dev)