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 5DF58A0544 for ; Thu, 17 Nov 2022 11:08:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59757410D7; Thu, 17 Nov 2022 11:08:15 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 8D2A340F18 for ; Thu, 17 Nov 2022 11:08:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668679693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t3K2zXNDRS4mGh12dfYx2sjM7eNaEoNld+i6Xlu/1FU=; b=KsPCRVYe4ig6Qbk6XtLAPtSBY7cYPNX5tsDbSOqL5CHeEWlf65dHEpI7EHknvWbHA6wgqq f+LJLUFx66etb4bmAX6FidJT0SvqE6EU9BHBKtEQc35RNuvWjflNCFzv4fXymHDDBD990D 9SV0MM4vFIcjTc5Rlw9C1DtftUB4nzw= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-369-iCoHavtmM1CSjTur7wN49g-1; Thu, 17 Nov 2022 05:08:11 -0500 X-MC-Unique: iCoHavtmM1CSjTur7wN49g-1 Received: by mail-wm1-f71.google.com with SMTP id o5-20020a05600c510500b003cfca1a327fso415663wms.8 for ; Thu, 17 Nov 2022 02:08:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t3K2zXNDRS4mGh12dfYx2sjM7eNaEoNld+i6Xlu/1FU=; b=G+FoSM6jfvZ1ViC8Hx1BfWeVJsRnQyk2UtdD9qqHQB023V4L6GRqFgC2GSw8lxOzXG FLEdShMRASEByh0B2AOHD2n5UYGDAIA0YlMZxQ+R7Hw9F/Eu4TSoui3HtjBs93sEJTM0 VI9xXK5krhbYsbxQ8IcxwxtaLROP+DOhSNjWsKGCEHznRvjJyZNwH/3k0hNMYT096Sao uwsrHrL5ELh/hKdaTtGseYjYaC5nvWWiYMLG2vzGRBWX5r82bh2mMiGErlnCyHdywxv4 D9kcqTSpV7QW3hP/tINzaP1RVsc0GzaMArSX4ZTr5wWBGxihpHLlZU0dZadHOEIPBAud AgnQ== X-Gm-Message-State: ANoB5pkgRLqbMsT7GitVTZ6SG1st+cdQTkgbsvE8OawrUL8YTOp1qIJT PiJIHV8IxgF7o7DZgWzG6sQX0DCfxcfd8qJVBamlAlXZKwZHFTFwRF6svPuWCY0JZI3ju/zhFMs DNg3BP1o= X-Received: by 2002:a1c:7701:0:b0:3cf:7556:a592 with SMTP id t1-20020a1c7701000000b003cf7556a592mr1149903wmi.199.1668679690206; Thu, 17 Nov 2022 02:08:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7z74yzWfMUidmXHUnvBfMYqCD1eOymBWqurbJcrkKUwf01d5/8NER5LcUnVCAy2kMlcGQ3dg== X-Received: by 2002:a1c:7701:0:b0:3cf:7556:a592 with SMTP id t1-20020a1c7701000000b003cf7556a592mr1149891wmi.199.1668679690055; Thu, 17 Nov 2022 02:08:10 -0800 (PST) Received: from [192.168.0.36] ([78.19.102.117]) by smtp.gmail.com with ESMTPSA id g17-20020a05600c311100b003a2f2bb72d5sm6434206wmo.45.2022.11.17.02.08.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Nov 2022 02:08:09 -0800 (PST) Message-ID: <77aaeace-0544-df21-bb59-f1b1cab50b8b@redhat.com> Date: Thu, 17 Nov 2022 10:08:08 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 To: "Mao,Yingming" Cc: Somnath Kotur , Ajit Khaparde , dpdk stable , Luca Boccassi , Christian Ehrhardt , "Xueming(Steven) Li" References: <20221025150734.142189-1-ktraynor@redhat.com> <20221025150734.142189-81-ktraynor@redhat.com> <62027908dd5048339f0731fdcb258a86@baidu.com> From: Kevin Traynor Subject: =?UTF-8?B?UmU6IOetlOWkjTogcGF0Y2ggJ25ldC9ibnh0OiBmaXggbnVsbCBwb2lu?= =?UTF-8?Q?ter_dereference_in_LED_config=27_has_been_queued_to_stable_releas?= =?UTF-8?B?ZSAyMS4xMS4z?= In-Reply-To: <62027908dd5048339f0731fdcb258a86@baidu.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed 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 On 17/11/2022 09:05, Mao,Yingming wrote: > Hi Kevin, Hi Mao Yingming, > I had received your email in 2022/10/25. Sorry for late reply. I have tested the following patch base dpdk20.11.6, it works ok. > > https://github.com/kevintraynor/dpdk-stable/commit/d4774717275b47c291f8da09da17aea4deedd822 > > This patch should backport to dpdk 20.11. Please push it do dpdk LTS 20.11. > This patch dose not need to be backported and does not apply to 19.11 > Cc'ing 20.11 and 19.11 LTS maintainers, Luca and Christian. > Regards, > Mao Yingming > > > -----邮件原件----- > 发件人: Kevin Traynor > 发送时间: 2022年10月25日 23:07 > 收件人: Mao,Yingming > 抄送: Somnath Kotur ; Ajit Khaparde ; dpdk stable > 主题: patch 'net/bnxt: fix null pointer dereference in LED config' has been queued to stable release 21.11.3 > > Hi, > > FYI, your patch has been queued to stable release 21.11.3 > > 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/01/22. 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/kevintraynor/dpdk-stable > > This queued commit can be viewed at: > https://github.com/kevintraynor/dpdk-stable/commit/d4774717275b47c291f8da09da17aea4deedd822 > > Thanks. > > Kevin > > --- > From d4774717275b47c291f8da09da17aea4deedd822 Mon Sep 17 00:00:00 2001 > From: Mao YingMing > Date: Tue, 2 Aug 2022 12:08:17 +0800 > Subject: [PATCH] net/bnxt: fix null pointer dereference in LED config > > [ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ] > > For VFs, bp->leds is uninitialized, check bp->leds is not null before checking for bp->leds->num_leds. > > segfault backtrace in trex program when use VF: > 11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true) > 10: bnxt_dev_led_on_op (dev=0x22d7780 ) > 9: rte_eth_led_on (port_id=0) > 8: DpdkTRexPortAttr::set_led (this=0x23b6ce0, on=true) > 7: DpdkTRexPortAttr::DpdkTRexPortAttr > 6: CTRexExtendedDriverBnxt::create_port_attr > 5: CPhyEthIF::Create > 4: CGlobalTRex::device_start > 3: CGlobalTRex::Create > 2: main_test > 1: main > > Fixes: d4d5a04 ("net/bnxt: fix unnecessary memory allocation") > > Signed-off-by: Mao YingMing > Acked-by: Somnath Kotur > Acked-by: Ajit Khaparde > --- > drivers/net/bnxt/bnxt_hwrm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 9c5257309a..51e1e2d6b3 100644 > --- a/drivers/net/bnxt/bnxt_hwrm.c > +++ b/drivers/net/bnxt/bnxt_hwrm.c > @@ -4536,5 +4536,5 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on) > int rc, i; > > - if (!bp->leds->num_leds || BNXT_VF(bp)) > + if (BNXT_VF(bp) || !bp->leds || !bp->leds->num_leds) > return -EOPNOTSUPP; > > -- > 2.37.3 > > --- > Diff of the applied patch vs upstream commit (please double-check if non-empty: > --- > --- - 2022-10-25 14:19:00.377396063 +0100 > +++ 0081-net-bnxt-fix-null-pointer-dereference-in-LED-config.patch 2022-10-25 14:18:58.513798456 +0100 > @@ -1 +1 @@ > -From 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 Mon Sep 17 00:00:00 2001 > +From d4774717275b47c291f8da09da17aea4deedd822 Mon Sep 17 00:00:00 2001 > @@ -5,0 +6,2 @@ > +[ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ] > + > @@ -23 +24,0 @@ > -Cc: stable@dpdk.org >