From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id E0FF11B51E for ; Fri, 23 Nov 2018 11:30:43 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4BDB73138BB4; Fri, 23 Nov 2018 10:30:43 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC0431866A; Fri, 23 Nov 2018 10:30:41 +0000 (UTC) From: Kevin Traynor To: Thomas Monjalon Cc: Wisam Jaddo , Gaetan Rivet , dpdk stable Date: Fri, 23 Nov 2018 10:27:04 +0000 Message-Id: <20181123102713.17309-60-ktraynor@redhat.com> In-Reply-To: <20181123102713.17309-1-ktraynor@redhat.com> References: <20181123102713.17309-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 23 Nov 2018 10:30:43 +0000 (UTC) Subject: [dpdk-stable] patch 'pci: fix parsing of address without function number' has been queued to stable release 18.08.1 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: , X-List-Received-Date: Fri, 23 Nov 2018 10:30:44 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/29/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From bd2f855f1def22d267469acab5952f0582b3bb24 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Mon, 12 Nov 2018 00:58:56 +0100 Subject: [PATCH] pci: fix parsing of address without function number [ upstream commit 31f19a9beb8d88b67be6e469404081eb834d199c ] If the last part of the PCI address (function number) is missing, the parsing was successful, assuming function 0. The call to strtoul is not returning an error in such a case, so an explicit check is inserted before. This bug has always been there in older parsing macros: - GET_PCIADDR_FIELD - GET_BLACKLIST_FIELD Fixes: af75078fece3 ("first public release") Reported-by: Wisam Jaddo Signed-off-by: Thomas Monjalon Acked-by: Gaetan Rivet --- lib/librte_pci/rte_pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c index 530738dbd..f400178bb 100644 --- a/lib/librte_pci/rte_pci.c +++ b/lib/librte_pci/rte_pci.c @@ -31,4 +31,8 @@ get_u8_pciaddr_field(const char *in, void *_u8, char dlm) char *end; + /* empty string is an error though strtoul() returns 0 */ + if (*in == '\0') + return NULL; + errno = 0; val = strtoul(in, &end, 16); -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-23 10:22:55.801130165 +0000 +++ 0060-pci-fix-parsing-of-address-without-function-number.patch 2018-11-23 10:22:54.000000000 +0000 @@ -1,8 +1,10 @@ -From 31f19a9beb8d88b67be6e469404081eb834d199c Mon Sep 17 00:00:00 2001 +From bd2f855f1def22d267469acab5952f0582b3bb24 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Mon, 12 Nov 2018 00:58:56 +0100 Subject: [PATCH] pci: fix parsing of address without function number +[ upstream commit 31f19a9beb8d88b67be6e469404081eb834d199c ] + If the last part of the PCI address (function number) is missing, the parsing was successful, assuming function 0. The call to strtoul is not returning an error in such a case, @@ -13,7 +15,6 @@ - GET_BLACKLIST_FIELD Fixes: af75078fece3 ("first public release") -Cc: stable@dpdk.org Reported-by: Wisam Jaddo Signed-off-by: Thomas Monjalon