From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A0312A0518 for ; Fri, 24 Jul 2020 14:05:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9230D1C0B5; Fri, 24 Jul 2020 14:05:08 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id D3C1C1C0B5 for ; Fri, 24 Jul 2020 14:05:06 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id r4so5118939wrx.9 for ; Fri, 24 Jul 2020 05:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RLUkKOa3tdoHy33/e8r7A0h+NURoOiekP9pSg3diElA=; b=VLUw8kwU4JEHG2pc8DK1rG8GYvrH4KRfqn4d1inyB8bMm9c4axqJhynAzjy/ORt+in LICuU/4yZj0JO/r/tqP5XYeqkAKpUBV29loug/6SbteQUYV1kcEp32pJgr34/3/wgr7P PCRjkVypksKCzFTwQt8qrP6GbIlsU/QjACAjM6zU5eY8nyQd5NMkmC+iigg5j7XjyC5s VX+EA/9s8oslPkGRxRUCJ3kCC5Lm1f3c8oSvt5L7g++/63PQQI1caW1hU9kmYKQIJ1Su cCgNODybOnwmWecx7CsdcrwnAdrGs/CkrSavAW8CPUKGJQCFLLG9dbYC/FFqgA07ql3E fyRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RLUkKOa3tdoHy33/e8r7A0h+NURoOiekP9pSg3diElA=; b=ozPfO2QgKvbjZfYHZzxV5rJhzrqYi28GFj1attjuao6qUdCA2Lr1eWiDYkh4fOblWN mc+MhyQxF+Jl6zqFwgZn/S6FzfOOU4KJsMNApgAnO/taBdnbKrZTfXqbc1SvXcORbf+z S1pRdyrA51sEbI4w4oC/r5+05GBrFjye4vu1X9z6Gc3Ip+i2sXSebJH04ICzJmKuFVyI w1ZL5QZjsrudAazb4p7yRcqpBC7Kqb9F42H7O8dGMGoAQ5Lq8aY+Vjd1DZFO3SPKTAQn AJ3IgO/mpUEOIKzpxPA7KKQZLNcIBdMg9vp+ozomSj6H/EPMyKppBddq8qxWCuOIwsrJ ka2Q== X-Gm-Message-State: AOAM532KFhs5tyB43C3ETG70ophs5Ze9SEd4MjkFD9yCdiAUuWCNmkpy uvWyhGpeX9NyZJQ8iROyKsc= X-Google-Smtp-Source: ABdhPJxvOEIJvVgB00x9OMwGWQFdp0TQr4TAzWtH0K/kobTOYYfNrXGx4Yaoi6cuQZZbKl7dz3cdOQ== X-Received: by 2002:adf:8b1a:: with SMTP id n26mr8845857wra.182.1595592306603; Fri, 24 Jul 2020 05:05:06 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id n18sm1224030wrw.45.2020.07.24.05.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:05:05 -0700 (PDT) From: luca.boccassi@gmail.com To: Maxime Coquelin Cc: =?UTF-8?q?Adri=C3=A1n=20Moreno?= , dpdk stable Date: Fri, 24 Jul 2020 12:58:23 +0100 Message-Id: <20200724120030.1863487-65-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'bus/dpaa: fix iterating on a class type' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 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/26/20. 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. Thanks. Luca Boccassi --- >From 3f26d928cf387a3d333a36ed8d92e0bd2c2bb95c Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Fri, 26 Jun 2020 16:04:28 +0200 Subject: [PATCH] bus/dpaa: fix iterating on a class type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit be2ee360fe86cf041d1a07577919160e6557c679 ] This patches fixes a null pointer dereferencing that happens when the device string passed to the iterator is NULL. This situation can happen when iterating on a class type. For example: RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) { ... } Fixes: e79df833d3f6 ("bus/dpaa: support hotplug ops") Signed-off-by: Maxime Coquelin Acked-by: Adrián Moreno --- drivers/bus/dpaa/dpaa_bus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index f27820db3..327d9269f 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -700,6 +700,11 @@ dpaa_bus_dev_iterate(const void *start, const char *str, struct rte_dpaa_device *dev; char *dup, *dev_name = NULL; + if (str == NULL) { + DPAA_BUS_DEBUG("No device string"); + return NULL; + } + /* Expectation is that device would be name=device_name */ if (strncmp(str, "name=", 5) != 0) { DPAA_BUS_DEBUG("Invalid device string (%s)\n", str); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:51.106331209 +0100 +++ 0065-bus-dpaa-fix-iterating-on-a-class-type.patch 2020-07-24 12:53:48.287006460 +0100 @@ -1,4 +1,4 @@ -From be2ee360fe86cf041d1a07577919160e6557c679 Mon Sep 17 00:00:00 2001 +From 3f26d928cf387a3d333a36ed8d92e0bd2c2bb95c Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Fri, 26 Jun 2020 16:04:28 +0200 Subject: [PATCH] bus/dpaa: fix iterating on a class type @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit be2ee360fe86cf041d1a07577919160e6557c679 ] + This patches fixes a null pointer dereferencing that happens when the device string passed to the iterator is NULL. This situation can happen when iterating on a class type. @@ -16,7 +18,6 @@ } Fixes: e79df833d3f6 ("bus/dpaa: support hotplug ops") -Cc: stable@dpdk.org Signed-off-by: Maxime Coquelin Acked-by: Adrián Moreno @@ -25,10 +26,10 @@ 1 file changed, 5 insertions(+) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c -index d53fe6083..591e28c1e 100644 +index f27820db3..327d9269f 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c -@@ -703,6 +703,11 @@ dpaa_bus_dev_iterate(const void *start, const char *str, +@@ -700,6 +700,11 @@ dpaa_bus_dev_iterate(const void *start, const char *str, struct rte_dpaa_device *dev; char *dup, *dev_name = NULL;