[dpdk-stable] patch 'net/virtio: fix unchecked return value' has been queued to LTS release 17.11.5

Yongseok Koh yskoh at mellanox.com
Fri Nov 30 19:01:27 CET 2018


> On Nov 30, 2018, at 7:23 AM, Tiwei Bie <tiwei.bie at intel.com> wrote:
> 
> On Thu, Nov 29, 2018 at 03:11:40PM -0800, Yongseok Koh wrote:
>> Hi,
>> 
>> FYI, your patch has been queued to LTS release 17.11.5
>> 
>> Note it hasn't been pushed to https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&data=02%7C01%7Cyskoh%40mellanox.com%7C801f0fcce7f94e96370c08d656d814a0%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636791883479064321&sdata=3yB8cI3v5wGyFIHIi%2FnPc0PpoLmIi%2F3o63dcgAd9EzY%3D&reserved=0 yet.
>> It will be pushed if I get no objections before 12/01/18. So please
>> shout if anyone has objections.
> 
> Hi,
> 
> This patch can't be backported, as it depends on some API
> change in newer release.

This patch could be applied cleanly but I'll remove it.

Thanks for confirming,
Yongseok


>> 
>> 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.
>> 
>> Yongseok
>> 
>> ---
>> From 85fa65d2e2a0b9e0ac4baa0ff2c5f99bed5427ec Mon Sep 17 00:00:00 2001
>> From: Tiwei Bie <tiwei.bie at intel.com>
>> Date: Wed, 7 Nov 2018 17:01:01 +0800
>> Subject: [PATCH] net/virtio: fix unchecked return value
>> 
>> [ upstream commit ecfae1510edc1391285aa566a2d31e7eae8fc6d2 ]
>> 
>> Coverity issue: 302861
>> Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
>> 
>> Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
>> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
>> ---
>> drivers/net/virtio/virtio_pci.c | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
>> index 89986c335..249ec6d3a 100644
>> --- a/drivers/net/virtio/virtio_pci.c
>> +++ b/drivers/net/virtio/virtio_pci.c
>> @@ -658,9 +658,15 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
>> 			hw->common_cfg = get_cfg_addr(dev, &cap);
>> 			break;
>> 		case VIRTIO_PCI_CAP_NOTIFY_CFG:
>> -			rte_pci_read_config(dev, &hw->notify_off_multiplier,
>> +			ret = rte_pci_read_config(dev,
>> +					&hw->notify_off_multiplier,
>> 					4, pos + sizeof(cap));
>> -			hw->notify_base = get_cfg_addr(dev, &cap);
>> +			if (ret != 4)
>> +				PMD_INIT_LOG(DEBUG,
>> +					"failed to read notify_off_multiplier, ret %d",
>> +					ret);
>> +			else
>> +				hw->notify_base = get_cfg_addr(dev, &cap);
>> 			break;
>> 		case VIRTIO_PCI_CAP_DEVICE_CFG:
>> 			hw->dev_cfg = get_cfg_addr(dev, &cap);
>> -- 
>> 2.11.0
>> 
>> ---
>>  Diff of the applied patch vs upstream commit (please double-check if non-empty:
>> ---
>> --- -	2018-11-29 15:01:49.832061811 -0800
>> +++ 0106-net-virtio-fix-unchecked-return-value.patch	2018-11-29 15:01:45.278957000 -0800
>> @@ -1,11 +1,12 @@
>> -From ecfae1510edc1391285aa566a2d31e7eae8fc6d2 Mon Sep 17 00:00:00 2001
>> +From 85fa65d2e2a0b9e0ac4baa0ff2c5f99bed5427ec Mon Sep 17 00:00:00 2001
>> From: Tiwei Bie <tiwei.bie at intel.com>
>> Date: Wed, 7 Nov 2018 17:01:01 +0800
>> Subject: [PATCH] net/virtio: fix unchecked return value
>> 
>> +[ upstream commit ecfae1510edc1391285aa566a2d31e7eae8fc6d2 ]
>> +
>> Coverity issue: 302861
>> Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
>> -Cc: stable at dpdk.org
>> 
>> Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
>> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
>> @@ -14,10 +15,10 @@
>>  1 file changed, 8 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
>> -index 21110cd69..c8883c32e 100644
>> +index 89986c335..249ec6d3a 100644
>> --- a/drivers/net/virtio/virtio_pci.c
>> +++ b/drivers/net/virtio/virtio_pci.c
>> -@@ -614,9 +614,15 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
>> +@@ -658,9 +658,15 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
>>  			hw->common_cfg = get_cfg_addr(dev, &cap);
>>  			break;
>>  		case VIRTIO_PCI_CAP_NOTIFY_CFG:



More information about the stable mailing list