Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/32269/?format=api
http://patches.dpdk.org/api/patches/32269/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20171214143343.28785-1-olivier.matz@6wind.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20171214143343.28785-1-olivier.matz@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20171214143343.28785-1-olivier.matz@6wind.com", "date": "2017-12-14T14:33:43", "name": "[dpdk-dev] net/virtio: fix incorrect cast of void *", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "f5b0bb152f47a8db31c0257905b464353512e745", "submitter": { "id": 8, "url": "http://patches.dpdk.org/api/people/8/?format=api", "name": "Olivier Matz", "email": "olivier.matz@6wind.com" }, "delegate": { "id": 355, "url": "http://patches.dpdk.org/api/users/355/?format=api", "username": "yliu", "first_name": "Yuanhan", "last_name": "Liu", "email": "yuanhan.liu@linux.intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20171214143343.28785-1-olivier.matz@6wind.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/32269/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/32269/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E882C1B012;\n\tThu, 14 Dec 2017 15:34:07 +0100 (CET)", "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n\t[62.23.145.76]) by dpdk.org (Postfix) with ESMTP id B7F101B00F;\n\tThu, 14 Dec 2017 15:34:06 +0100 (CET)", "from glumotte.dev.6wind.com (unknown [10.16.0.195])\n\tby proxy.6wind.com (Postfix) with ESMTP id C89B81145B9;\n\tThu, 14 Dec 2017 15:25:41 +0100 (CET)" ], "From": "Olivier Matz <olivier.matz@6wind.com>", "To": "dev@dpdk.org, Yuanhan Liu <yliu@fridaylinux.org>,\n\tMaxime Coquelin <maxime.coquelin@redhat.com>", "Cc": "Didier Pallard <didier.pallard@6wind.com>,\n\tstable@dpdk.org", "Date": "Thu, 14 Dec 2017 15:33:43 +0100", "Message-Id": "<20171214143343.28785-1-olivier.matz@6wind.com>", "X-Mailer": "git-send-email 2.11.0", "Subject": "[dpdk-dev] [PATCH] net/virtio: fix incorrect cast of void *", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Didier Pallard <didier.pallard@6wind.com>\n\nThe rx_queues and tx_queues fields of the data structure points to a struct\nvirtnet_rx or virtnet_tx. Casting it to a virtqueue is an error.\n\nIt does not trigger any bug because pointer is not dereferenced inside the\nfunction, but it can become a bug if this code is copy/pasted and vq is\ndereferenced.\n\nFixes: 01ad44fd374f (\"net/virtio: split Rx/Tx queue\")\nCc: stable@dpdk.org\n\nSigned-off-by: Didier Pallard <didier.pallard@6wind.com>\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n drivers/net/virtio/virtio_ethdev.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex c0ba83b06..b398f9960 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -893,7 +893,7 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,\n \t\t/* Note: limit checked in rte_eth_xstats_names() */\n \n \t\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n-\t\t\tstruct virtqueue *rxvq = dev->data->rx_queues[i];\n+\t\t\tstruct virtnet_rx *rxvq = dev->data->rx_queues[i];\n \t\t\tif (rxvq == NULL)\n \t\t\t\tcontinue;\n \t\t\tfor (t = 0; t < VIRTIO_NB_RXQ_XSTATS; t++) {\n@@ -906,7 +906,7 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,\n \t\t}\n \n \t\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n-\t\t\tstruct virtqueue *txvq = dev->data->tx_queues[i];\n+\t\t\tstruct virtnet_tx *txvq = dev->data->tx_queues[i];\n \t\t\tif (txvq == NULL)\n \t\t\t\tcontinue;\n \t\t\tfor (t = 0; t < VIRTIO_NB_TXQ_XSTATS; t++) {\n", "prefixes": [ "dpdk-dev" ] }{ "id": 32269, "url": "