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 7239143C60 for ; Thu, 7 Mar 2024 02:33:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C58C42EDC; Thu, 7 Mar 2024 02:33:40 +0100 (CET) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id B331140261 for ; Thu, 7 Mar 2024 02:33:39 +0100 (CET) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41305fe71e8so3478645e9.3 for ; Wed, 06 Mar 2024 17:33:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775219; x=1710380019; 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=sQrANlLqcsQqYR2vUAMpmEImvV8pvuSChD0FEb8LtN8=; b=hjiMU5GhNzyqnMq4SLYCgDKACoUWu1ToqKFF+m83c7qI9U7nY/ZeYTrFS38QOO9KiO 734sJcg0HDXdBga7Lv0dex/eCXNLVIlK14dhU9LP5x6gkO0mMRrXHB1YcwRq970mo0ps uye1uKM0FDsE5saeVWmbZoKGwjN3+WQncs0K3nN6+PKFQlsc8EOfm4bkdoBRnVc/iNMH CZu9N29yspK/ArY1qZDwTj+O7dIgjdF6FcY8ZrwgWPxQY51/B5C0wtpUgB076+sPvhtr SQ3o5Rg1o4mdPCqT87VsMqmsy/cXyAHzffHcJnbgfrKAx+LSEgaQ4SOdWaWx7GQJCcBA xHlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775219; x=1710380019; 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=sQrANlLqcsQqYR2vUAMpmEImvV8pvuSChD0FEb8LtN8=; b=KvuedQM6hh2RXVzNoxzwVRdQN6xZ3nXHNvle4vnTA59uIQKc55cq4HprlZDFhOWWub FLo39DyOSu/71dxXDgJszyx7o2IuT0QNtNi5XoEg46mXwPyaeFf8H4oXeihUNjGBRP69 jsibbpHaTOqXlpwLQ3tyyuFsO8kCRUzKo+MDRmzwq4UtwiQ2RO/4qsJT5OJacF83n9TL OF0IhGMzA6eNozo0XfRj1KIqAwocnNXhw5J7wMwpLWjR7HDWDv9fUx4gI1nWdGp7mOFT ddMAmPSkY1OyfPEuGw4peKMZdna4upJ4w6cXvEfeqGkzZl8UR1eWMoObJmH6m4NSsrK+ 53eA== X-Gm-Message-State: AOJu0Yzex/jXfZ/lEdcBpueaM9+mu/uq4Ic33twXs4iHJV/R4L0fD7Kp 84uZ9WE2TVhqLYcHJKX3YL0vxLAeGUrfE4/J7ot6bnp66CIccpfEY+vuVXzh X-Google-Smtp-Source: AGHT+IGt+fu19/3arW0+VwCiQk+tifPbbiIxFuo2CixELy0iE4YvDFuASPq4boKPciDCB21w7SROhg== X-Received: by 2002:a05:6000:505:b0:33d:2eba:f5cb with SMTP id a5-20020a056000050500b0033d2ebaf5cbmr11789656wrf.24.1709775219206; Wed, 06 Mar 2024 17:33:39 -0800 (PST) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id i12-20020adff30c000000b0033e34b344f8sm10858656wro.77.2024.03.06.17.33.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:33:38 -0800 (PST) From: luca.boccassi@gmail.com To: Chengwen Feng Cc: dpdk stable Subject: patch 'dma/idxd: verify strdup return' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:30:42 +0000 Message-Id: <20240307013159.1735343-25-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-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.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/09/24. 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/705ab71cea993a3714f29190da25e61a6bf0d3ef Thanks. Luca Boccassi --- >From 705ab71cea993a3714f29190da25e61a6bf0d3ef Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 10 Nov 2023 10:01:06 +0000 Subject: [PATCH] dma/idxd: verify strdup return [ upstream commit 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c ] Add verify strdup return value logic. Fixes: e888bb1278c6 ("dma/idxd: add bus device probing") Signed-off-by: Chengwen Feng --- drivers/dma/idxd/idxd_bus.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c index 3b2d4c2b65..ba8076715d 100644 --- a/drivers/dma/idxd/idxd_bus.c +++ b/drivers/dma/idxd/idxd_bus.c @@ -261,9 +261,15 @@ static int is_for_this_process_use(struct rte_dsa_device *dev, const char *name) { char *runtime_dir = strdup(rte_eal_get_runtime_dir()); - char *prefix = basename(runtime_dir); - int prefixlen = strlen(prefix); int retval = 0; + int prefixlen; + char *prefix; + + if (runtime_dir == NULL) + return retval; + + prefix = basename(runtime_dir); + prefixlen = strlen(prefix); if (strncmp(name, "dpdk_", 5) == 0) retval = 1; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-07 01:05:37.204286823 +0000 +++ 0025-dma-idxd-verify-strdup-return.patch 2024-03-07 01:05:34.706938064 +0000 @@ -1 +1 @@ -From 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c Mon Sep 17 00:00:00 2001 +From 705ab71cea993a3714f29190da25e61a6bf0d3ef Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org