Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/106606/?format=api
http://patchwork.dpdk.org/api/patches/106606/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220127110953.499464-1-maxime.coquelin@redhat.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20220127110953.499464-1-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220127110953.499464-1-maxime.coquelin@redhat.com", "date": "2022-01-27T11:09:53", "name": "vhost: fix unsafe vrings addresses modifications", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "79b7c3080f3b177e13ad46e594c3a1badaf0d4b5", "submitter": { "id": 512, "url": "http://patchwork.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.com" }, "delegate": { "id": 2642, "url": "http://patchwork.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220127110953.499464-1-maxime.coquelin@redhat.com/mbox/", "series": [ { "id": 21399, "url": "http://patchwork.dpdk.org/api/series/21399/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=21399", "date": "2022-01-27T11:09:53", "name": "vhost: fix unsafe vrings addresses modifications", "version": 1, "mbox": "http://patchwork.dpdk.org/series/21399/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/106606/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/106606/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 0AD19A0350;\n\tThu, 27 Jan 2022 12:10:19 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BC4BC427C1;\n\tThu, 27 Jan 2022 12:10:18 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id 76A49427A8\n for <dev@dpdk.org>; Thu, 27 Jan 2022 12:10:16 +0100 (CET)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-170-FxNRlr2kOCaJzMx_K2EVbQ-1; Thu, 27 Jan 2022 06:10:12 -0500", "from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com\n [10.5.11.13])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A0B9D8519E3;\n Thu, 27 Jan 2022 11:10:11 +0000 (UTC)", "from max-t490s.redhat.com (unknown [10.39.208.34])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 93AB47316A;\n Thu, 27 Jan 2022 11:09:55 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1643281816;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=V+Ee3ig87/3NCCrSaPnnVP3IIESatg7O/mk3BS3zGXE=;\n b=IbwjmZ8NH0/JTjJDKoxQu1GxppPmRYCMydRbZy9opOyXlPFn3ooXi6WtW1bhKVnS6KFQNp\n JrzslU2PpfgBfWnZUx3R/gQWRlMLgClASknyqGyLdcpYU0Br8Qf58NKiNJmvm/n3OFawTU\n fxRFvTTRGnDhCbHg3Aa47pORxknTUpc=", "X-MC-Unique": "FxNRlr2kOCaJzMx_K2EVbQ-1", "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "dev@dpdk.org, chenbo.xia@intel.com, yuanx.wang@intel.com,\n david.marchand@redhat.com", "Cc": "stable@dpdk.org,\n\tMaxime Coquelin <maxime.coquelin@redhat.com>", "Subject": "[PATCH] vhost: fix unsafe vrings addresses modifications", "Date": "Thu, 27 Jan 2022 12:09:53 +0100", "Message-Id": "<20220127110953.499464-1-maxime.coquelin@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "This patch adds missing protection around vring_invalidate\nand translate_ring_addresses calls in vhost_user_iotlb_msg.\n\nFixes: eefac9536a90 (\"vhost: postpone device creation until rings are mapped\")\nCc: stable@dpdk.org\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/vhost_user.c | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)", "diff": "diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c\nindex 5eb1dd6812..ae8513c465 100644\n--- a/lib/vhost/vhost_user.c\n+++ b/lib/vhost/vhost_user.c\n@@ -2566,8 +2566,11 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,\n \t\t\tvhost_user_iotlb_cache_insert(vq, imsg->iova, vva,\n \t\t\t\t\tlen, imsg->perm);\n \n-\t\t\tif (is_vring_iotlb(dev, vq, imsg))\n+\t\t\tif (is_vring_iotlb(dev, vq, imsg)) {\n+\t\t\t\trte_spinlock_lock(&vq->access_lock);\n \t\t\t\t*pdev = dev = translate_ring_addresses(dev, i);\n+\t\t\t\trte_spinlock_unlock(&vq->access_lock);\n+\t\t\t}\n \t\t}\n \t\tbreak;\n \tcase VHOST_IOTLB_INVALIDATE:\n@@ -2580,8 +2583,11 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,\n \t\t\tvhost_user_iotlb_cache_remove(vq, imsg->iova,\n \t\t\t\t\timsg->size);\n \n-\t\t\tif (is_vring_iotlb(dev, vq, imsg))\n+\t\t\tif (is_vring_iotlb(dev, vq, imsg)) {\n+\t\t\t\trte_spinlock_lock(&vq->access_lock);\n \t\t\t\tvring_invalidate(dev, vq);\n+\t\t\t\trte_spinlock_unlock(&vq->access_lock);\n+\t\t\t}\n \t\t}\n \t\tbreak;\n \tdefault:\n", "prefixes": [] }{ "id": 106606, "url": "