On 04/03/2025 16:51, Jay Ding wrote:
> I actually send it through "git send-email".
> 
> Thanks,
> Jay
> 

Hi Jay. Thanks for the patch. I didn't see it on the mailing list. It
should be sent with something like,
'git send-email <patchname>.patch --to=d...@openvswitch.org'

Might be easiest to test with your own email as the --to to check it's
sending ok.

As it's just a one line patch, I updated the subject and re-posted for
you to the mailing list here:
https://mail.openvswitch.org/pipermail/ovs-dev/2025-March/421886.html

Kevin.

p.s. The mailing list convention is to not top-post in emails, but to
reply inline!


> On Tue, Mar 4, 2025 at 11:33 AM Jay Ding <jay.d...@broadcom.com> wrote:
> 
>> Hi Kevin,
>>
>> Thanks for the quick response. Can I just post the fix here because it is
>> a very simple change? Just found it takes some steps to configure the "git
>> send-email". Let me know if I have to do it that way.
>>
>> From ab7ac6a7acafbbda61a813b682612c56246e9f17 Mon Sep 17 00:00:00 2001
>> From: Jay Ding <jay.d...@broadcom.com>
>> Date: Mon, 3 Mar 2025 05:58:09 -0600
>> Subject: [PATCH] Fix: fix null pointer issue with dev_info
>>
>> rte_eth_dev_info_get() could fail due to device reset, etc.
>> The return value should be checked before the pointer dev_info
>> is dereferenced.
>>
>> Signed-off-by: Jay Ding <jay.d...@broadcom.com>
>> ---
>>  lib/netdev-dpdk.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>> index 549887b31..58cbe079a 100644
>> --- a/lib/netdev-dpdk.c
>> +++ b/lib/netdev-dpdk.c
>> @@ -2423,7 +2423,7 @@ netdev_dpdk_set_config(struct netdev *netdev, const
>> struct smap *args,
>>      }
>>
>>      lsc_interrupt_mode = smap_get_bool(args, "dpdk-lsc-interrupt", true);
>> -    if (lsc_interrupt_mode && !(*info.dev_flags & RTE_ETH_DEV_INTR_LSC)) {
>> +    if (lsc_interrupt_mode && !ret && !(*info.dev_flags &
>> RTE_ETH_DEV_INTR_LSC)) {
>>          if (smap_get(args, "dpdk-lsc-interrupt")) {
>>              VLOG_WARN_BUF(errp, "'%s': link status interrupt is not "
>>                            "supported.", netdev_get_name(netdev));
>> --
>> 2.31.1
>>
>> Thanks,
>> Jay
>>
>> On Tue, Mar 4, 2025 at 5:41 AM Kevin Traynor <ktray...@redhat.com> wrote:
>>
>>> On 03/03/2025 17:19, Jay Ding via dev wrote:
>>>> Hi,
>>>>
>>>
>>> Hi,
>>>
>>>> Calling rte_eth_dev_info_get() and not checking its return value
>>>> before dereferencing
>>>> the dev_info pointer is a critical error in Openvswitch code. It can
>>> lead
>>>> to a crash (segmentation fault) or unpredictable behavior if the
>>> function
>>>> fails to retrieve the device information.
>>>>
>>>> I saw it has been fixed in most of the functions except
>>>> in netdev_dpdk_set_config(). Please take a look at the patch and let me
>>>> know if you have questions.
>>>>
>>>
>>> The mailing list strips out attachments. Can you send the patch to the
>>> mailing list with 'git send-email' ?
>>>
>>> There's information on submitting a patch here:
>>>
>>> https://docs.openvswitch.org/en/latest/internals/contributing/submitting-patches/
>>>
>>>
>>> thanks,
>>> Kevin.
>>>
>>>> Thanks,
>>>> Jay
>>>>
>>>>
>>>> _______________________________________________
>>>> dev mailing list
>>>> d...@openvswitch.org
>>>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>>
>>>
> 

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to