get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/43782/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 43782,
    "url": "http://patches.dpdk.org/api/patches/43782/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180817113354.16140-1-i.maximets@samsung.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": "<20180817113354.16140-1-i.maximets@samsung.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180817113354.16140-1-i.maximets@samsung.com",
    "date": "2018-08-17T11:33:54",
    "name": "vhost: fix crash if set vring num handling failed",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5cff05946f0d8bd47e0648849c772332ec26b752",
    "submitter": {
        "id": 323,
        "url": "http://patches.dpdk.org/api/people/323/?format=api",
        "name": "Ilya Maximets",
        "email": "i.maximets@samsung.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180817113354.16140-1-i.maximets@samsung.com/mbox/",
    "series": [
        {
            "id": 1011,
            "url": "http://patches.dpdk.org/api/series/1011/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1011",
            "date": "2018-08-17T11:33:54",
            "name": "vhost: fix crash if set vring num handling failed",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1011/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43782/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43782/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 926D110A3;\n\tFri, 17 Aug 2018 13:32:59 +0200 (CEST)",
            "from mailout1.w1.samsung.com (mailout1.w1.samsung.com\n\t[210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 2C5E2FEB;\n\tFri, 17 Aug 2018 13:32:57 +0200 (CEST)",
            "from eucas1p1.samsung.com (unknown [182.198.249.206])\n\tby mailout1.w1.samsung.com (KnoxPortal) with ESMTP id\n\t20180817113256euoutp01f27acab12dfdacc87fa199476e8e9bbd~LqLEida9C0857108571euoutp01q;\n\tFri, 17 Aug 2018 11:32:56 +0000 (GMT)",
            "from eusmges3new.samsung.com (unknown [203.254.199.245]) by\n\teucas1p1.samsung.com (KnoxPortal) with ESMTP id\n\t20180817113256eucas1p1827306a2e5a9a495283475f7b99b08f0~LqLEG3BE_2066320663eucas1p1Y;\n\tFri, 17 Aug 2018 11:32:56 +0000 (GMT)",
            "from eucas1p2.samsung.com ( [182.198.249.207]) by\n\teusmges3new.samsung.com (EUCPMTA) with SMTP id 90.98.04806.862B67B5;\n\tFri, 17 Aug 2018 12:32:56 +0100 (BST)",
            "from eusmgms2.samsung.com (unknown [182.198.249.180]) by\n\teucas1p2.samsung.com (KnoxPortal) with ESMTP id\n\t20180817113255eucas1p2042d22241265dafa241c2a6a2c949244~LqLDd32Eb2998029980eucas1p2Z;\n\tFri, 17 Aug 2018 11:32:55 +0000 (GMT)",
            "from eusync3.samsung.com ( [203.254.199.213]) by\n\teusmgms2.samsung.com (EUCPMTA) with SMTP id 7F.B4.04128.762B67B5;\n\tFri, 17 Aug 2018 12:32:55 +0100 (BST)",
            "from imaximets.rnd.samsung.ru ([106.109.129.180]) by\n\teusync3.samsung.com (Oracle Communications Messaging Server\n\t7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id\n\t<0PDL00533S2RIV40@eusync3.samsung.com>; \n\tFri, 17 Aug 2018 12:32:55 +0100 (BST)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com\n\t20180817113256euoutp01f27acab12dfdacc87fa199476e8e9bbd~LqLEida9C0857108571euoutp01q",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;\n\ts=mail20170921; t=1534505576;\n\tbh=vbGAAvy2/dHXUsczNq1lDI+eWfDujLrk97dHfZA17Sg=;\n\th=From:To:Cc:Subject:Date:References:From;\n\tb=eyVWkoNUUeTyfyCVmqzhSKsyHtyFcy1YNJXPncvIR5/5WU6RyY9j2bznxpvFeJQC8\n\tifuSrZ3SfwRRFsxxq57zYRI2AP8PYzKOZMa3+aYFZEt4ObKkWReqFnvn5nMTRD1d/q\n\tNLYx242RerEiojQwQo2M6v1XtMYPl4AZaeka+JK4=",
        "X-AuditID": "cbfec7f5-34dff700000012c6-a3-5b76b268fc07",
        "From": "Ilya Maximets <i.maximets@samsung.com>",
        "To": "dev@dpdk.org",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>, Tiwei Bie\n\t<tiwei.bie@intel.com>, Zhihong Wang <zhihong.wang@intel.com>,\n\tIlya Maximets <i.maximets@samsung.com>, stable@dpdk.org",
        "Date": "Fri, 17 Aug 2018 14:33:54 +0300",
        "Message-id": "<20180817113354.16140-1-i.maximets@samsung.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "X-Brightmail-Tracker": [
            "H4sIAAAAAAAAA+NgFprCIsWRmVeSWpSXmKPExsWy7djP87oZm8qiDbousli8+7SdyeJK+092\n\ti2Ode1gs/nX8YbfY2vCfyWLz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Ak4Su7tnsoLYLAKqEjsn\n\t7QFq5uDgFbCWWDijEmKbvMTqDQeYJzByLWBkWMUoklpanJueW2ykV5yYW1yal66XnJ+7iRHo\n\t+23Hfm7Zwdj1LvgQowAHoxIP74S1pdFCrIllxZW5hxglOJiVRHgjl5dFC/GmJFZWpRblxxeV\n\t5qQWH2KU5mBREuc9b1AZJSSQnliSmp2aWpBaBJNl4uCUamA8mVVdsObvq3qpL4ZZPMKHfhoI\n\tRHtw/FyetiVO9c1P27uHb5XFKd1K9ZbMUdizakGLp2t84eYvf90ULQV/NKd374vI3OdaEDFF\n\tMsf2Y6jtxfu1rp/rfaxK/u7mVH2csOz9hpLTfpvlem4oP5y4NMBhfZ9p0eU/BxK+M7T+T24o\n\taZ297f56bWslluKMREMt5qLiRAC5JLdD+QEAAA=="
        ],
        "X-CMS-MailID": "20180817113255eucas1p2042d22241265dafa241c2a6a2c949244",
        "X-Msg-Generator": "CA",
        "CMS-TYPE": "201P",
        "X-CMS-RootMailID": "20180817113255eucas1p2042d22241265dafa241c2a6a2c949244",
        "References": "<CGME20180817113255eucas1p2042d22241265dafa241c2a6a2c949244@eucas1p2.samsung.com>",
        "Subject": "[dpdk-dev] [PATCH] vhost: fix crash if set vring num handling failed",
        "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://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Allocation failures of shadow used ring and batched copy array\nare not recoverable and leads to the segmentation faults like\nthis on the receiving/transmission path:\n\n  Program received signal SIGSEGV, Segmentation fault.\n  [Switching to Thread 0x7f913fecf0 (LWP 43625)]\n  in copy_desc_to_mbuf () at /lib/librte_vhost/virtio_net.c:760\n  760       batch_copy[vq->batch_copy_nb_elems].dst =\n\nThis could be easily reproduced in case of low memory or big\nnumber of vhost-user ports. Fix that by propagating error to\nthe upper layer which will end up with disconnection.\n\nFixes: f689586bc060 (\"vhost: shadow used ring update\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ilya Maximets <i.maximets@samsung.com>\n---\n lib/librte_vhost/vhost_user.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 9aa1ce118..4c7fd57fb 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -1693,7 +1693,9 @@ vhost_user_msg_handler(int vid, int fd)\n \t\tbreak;\n \n \tcase VHOST_USER_SET_VRING_NUM:\n-\t\tvhost_user_set_vring_num(dev, &msg);\n+\t\tret = vhost_user_set_vring_num(dev, &msg);\n+\t\tif (ret)\n+\t\t\treturn -1;\n \t\tbreak;\n \tcase VHOST_USER_SET_VRING_ADDR:\n \t\tvhost_user_set_vring_addr(&dev, &msg);\n",
    "prefixes": []
}