virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated
PATCH 1/1 virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated
From: Damjan Marion <[email protected]>
If VIRTIO_NET_F_CTRL_VQ is not negotiated hw->cvq will be NULL
--- lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
lib/librte_pmd_virtio/virtio_rxtx.c +4 -2
@@ -328,8 +328,10 @@ virtio_dev_cq_start(struct rte_eth_dev *dev)struct virtio_hw *hw =VIRTIO_DEV_PRIVATE_TO_HW (dev->data->dev_private); -virtio_dev_vring_start (hw->cvq,VTNET_CQ ); -VIRTQUEUE_DUMP ((struct virtqueue *)hw->cvq); +if (hw->cvq) { +virtio_dev_vring_start (hw->cvq,VTNET_CQ ); +VIRTQUEUE_DUMP ((struct virtqueue *)hw->cvq); + } }void
Signature · 1 line
2.1.0
Ouyang, Changchun
Acked-byHi
Quoted 36 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of [email protected]
Sent: Friday, September 12, 2014 6:25 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH] virtio: fix crash ifVIRTIO_NET_F_CTRL_VQis not negotiatedFrom: Damjan Marion <[email protected]>
If
VIRTIO_NET_F_CTRL_VQis not negotiatedhw->cvqwill be NULLSigned-off-by Damjan Marion <[email protected]>--- lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)lib/librte_pmd_virtio/virtio_rxtx.c +4
-3@@ -328,8 +328,10 @@ virtio_dev_cq_start(struct rte_eth_dev *dev)struct virtio_hw *hw =VIRTIO_DEV_PRIVATE_TO_HW (dev->data->dev_private); -virtio_dev_vring_start (hw->cvq,VTNET_CQ ); -VIRTQUEUE_DUMP ((struct virtqueue *)hw->cvq); +if (hw->cvq) { +virtio_dev_vring_start (hw->cvq,VTNET_CQ ); +VIRTQUEUE_DUMP ((struct virtqueue *)hw->cvq); + } }void --
Quoted 1 line
2.1.0
Olivier MATZ
Acked-byHello,
Quoted 9 lines · On 09/12/2014 12:25 AM, [email protected] wrote:
From: Damjan Marion <[email protected]>
If
VIRTIO_NET_F_CTRL_VQis not negotiatedhw->cvqwill be NULLSigned-off-by Damjan Marion <[email protected]>--- lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Quoted 7 lines · Olivier MATZ
Hello,
Quoted 4 lines · On 09/12/2014 12:25 AM, [email protected] wrote:
From: Damjan Marion <[email protected]>
If
VIRTIO_NET_F_CTRL_VQis not negotiatedhw->cvqwill be NULL
Quoted 8 lines
Quoted 5 lines
Signed-off-by Damjan Marion <[email protected]>--- lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Acked-by Olivier Matz <[email protected]>
Is this going to be applied or any action pending on my side?
Thanks,
Damjan
2014-09-29 18:09, Damjan Marion:
Quoted 12 lines · Olivier MATZ
Quoted 9 lines · On 09/12/2014 12:25 AM, [email protected] wrote:
Quoted 6 lines
If
VIRTIO_NET_F_CTRL_VQis not negotiatedhw->cvqwill be NULLSigned-off-by Damjan Marion <[email protected]>--- lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Acked-by Olivier Matz <[email protected]>Is this going to be applied or any action pending on my side?
It's now applied.
Thanks
Signature · 1 line
Thomas