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 BC4BFA0518 for ; Fri, 24 Jul 2020 14:05:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AFADD1C039; Fri, 24 Jul 2020 14:05:19 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 0011B1C07E for ; Fri, 24 Jul 2020 14:05:18 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id o8so7743947wmh.4 for ; Fri, 24 Jul 2020 05:05:18 -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=bAwurBMXSi1Qqy4rcEys3/7kEs+LNqijWRvLRMmNtgc=; b=TY2JEb/J0kTJwn1aG7mtbjJF55OGIDMB95028n/EAi1xL8MFxDwLJALmN1h1IxAwaB guJVR0BQ1iyi4LH27uL5NRxvsg1HO8ulEQRsD/l12CLLZa3gg5OX/qP5QRGtvmMiBdDw jngVek2yRYUwTtfLeHLmf4jYmPdzLNEvOU4leS4ZmFyp2FyWiPdz6F8Rvk3tI5UskDti F+ucWqvvAyO5Hgvm8KQJI81UWTu/h/0bti1quazSe6hs6bmLstkej51gPCZHnFU78i+c U9cPCoGqGy6qGTz5HB0gTdMI/X9adGk6g+KZSIoJjux9rDkxbtMRA+YLuhANUGs3/0S6 HSeg== 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=bAwurBMXSi1Qqy4rcEys3/7kEs+LNqijWRvLRMmNtgc=; b=e8fyEtYAlW6WqkaBsajfyXaR4bmXJG66V4OJZkom9HEwuKdQ7mfW9K1VsBQ6SHFA+K IdMUxWrTF8w3OMjkZvTNmyzNNqVlfDAutkR2t7Ocg0AFWQYyHdrhRozToV24cY1BuwT7 8mIKql1biyF/+07XeEtLHBWAdJ/QozZO/QnBFWSjGdFvw7rvvl+hqIIvgUvJc32Wg0WF E8soS7ZlTJPdQAyuKL0d9eHHRlP6yI5KM0qZFSJrso+KquZcU7Q4RTw1no9EGURx6Q7v 13lxUfy8weWC+rDHJ8gF/z7fTTq63zZqitu+TbM9YY6nQWJwdmq2eaSKfyJlNhnxqNJl AATQ== X-Gm-Message-State: AOAM5316EyisKFC4Z5GWE+oYLzmZXdv5p1iJKxfKoP2UpwiTJjASO7Qm ur/uS4Kgu1co1TgQb2/qbAQ= X-Google-Smtp-Source: ABdhPJyBmt4yVABYo3OKQwGERPSksAvhh4ZpRpXe6qd8m3EUnsUVsfTJeq7At0eh65xXxdLJwGnjzg== X-Received: by 2002:a7b:c92e:: with SMTP id h14mr8194970wml.36.1595592318700; Fri, 24 Jul 2020 05:05:18 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id b139sm7436502wmd.19.2020.07.24.05.05.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:05:17 -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:24 +0100 Message-Id: <20200724120030.1863487-66-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/fslmc: 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 f232d2d9db3324a689ac6c5cfc9cadd6c165c1d3 Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Fri, 26 Jun 2020 16:04:29 +0200 Subject: [PATCH] bus/fslmc: fix iterating on a class type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 44255245433b3b4394474db100d478341aeb08fc ] 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: e67a61614d0b ("bus/fslmc: support device iteration") Signed-off-by: Maxime Coquelin Acked-by: Adrián Moreno --- drivers/bus/fslmc/fslmc_bus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index b3e964aa9..7431177f2 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -608,6 +608,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str, struct rte_dpaa2_device *dev; char *dup, *dev_name = NULL; + if (str == NULL) { + DPAA2_BUS_DEBUG("No device string"); + return NULL; + } + /* Expectation is that device would be name=device_name */ if (strncmp(str, "name=", 5) != 0) { DPAA2_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.141507409 +0100 +++ 0066-bus-fslmc-fix-iterating-on-a-class-type.patch 2020-07-24 12:53:48.287006460 +0100 @@ -1,4 +1,4 @@ -From 44255245433b3b4394474db100d478341aeb08fc Mon Sep 17 00:00:00 2001 +From f232d2d9db3324a689ac6c5cfc9cadd6c165c1d3 Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Fri, 26 Jun 2020 16:04:29 +0200 Subject: [PATCH] bus/fslmc: fix iterating on a class type @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit 44255245433b3b4394474db100d478341aeb08fc ] + 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: e67a61614d0b ("bus/fslmc: support device iteration") -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/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c -index afbd82e8d..ac46eb4fe 100644 +index b3e964aa9..7431177f2 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c -@@ -603,6 +603,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str, +@@ -608,6 +608,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str, struct rte_dpaa2_device *dev; char *dup, *dev_name = NULL;