get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54924,
    "url": "http://patches.dpdk.org/api/patches/54924/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190618161636.23748-7-stephen@networkplumber.org/",
    "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": "<20190618161636.23748-7-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190618161636.23748-7-stephen@networkplumber.org",
    "date": "2019-06-18T16:16:34",
    "name": "[v3,6/8] kni: return -EFAULT if copy_from_user fails",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c6cf09b1d314385dad9c045b30da4db2e7d65ce8",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190618161636.23748-7-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 5063,
            "url": "http://patches.dpdk.org/api/series/5063/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5063",
            "date": "2019-06-18T16:16:28",
            "name": "kni: fixes and cleanups",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/5063/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54924/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54924/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "MIME-Version": "1.0",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Google-Smtp-Source": "APXvYqxM8qTvsSPWZio7USnIoJ6DdTbeVFwaLkvsQSKmvxLnSK3zp+59Km92DDfb0eauVUNXULRHDA==",
        "References": "<20190610175155.21374-1-stephen@networkplumber.org>\n\t<20190618161636.23748-1-stephen@networkplumber.org>",
        "In-Reply-To": "<20190618161636.23748-1-stephen@networkplumber.org>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=9ZfM4adtNVrF7wT1Mjc0z707Ax+G9osFiWtI1ekyG9E=;\n\tb=ZMHakhQf5KELU5sXzAUmwXch86SYWOSu+YGD0oC0n72PII0TOME1gEElqu0aLoKQAU\n\t0BOwvUhFdOt6KpC5nUCIIzWADk147cOh0QwK5aTpczXmVbmpdZQ9uWFOLzcV46Jp0O3w\n\tkkM4j0bNngd67DXE2QzSIKjJ7p5VAAMvhnuRwf//8yyy4lGfYhYUbE/zF5K4K8gziiGu\n\tLVaOaJd14qqABVrAfO2UH83PrPaNaomqHkguhCg8Y6JhRjptsRA6AjoNuMVTuuZBWr9i\n\tWvXeqmiBUekrPfoww/gbQfHUsPyULTQQdlWCN7yBl5DBKTwpvggW0AFzZ9+GRMiHucmV\n\tRQTQ==",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 784FB1C24A;\n\tTue, 18 Jun 2019 18:17:02 +0200 (CEST)",
            "from mail-pf1-f193.google.com (mail-pf1-f193.google.com\n\t[209.85.210.193]) by dpdk.org (Postfix) with ESMTP id EB65E1C228\n\tfor <dev@dpdk.org>; Tue, 18 Jun 2019 18:16:52 +0200 (CEST)",
            "by mail-pf1-f193.google.com with SMTP id a186so7937411pfa.5\n\tfor <dev@dpdk.org>; Tue, 18 Jun 2019 09:16:52 -0700 (PDT)",
            "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\t3sm15485385pfp.114.2019.06.18.09.16.50\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tTue, 18 Jun 2019 09:16:50 -0700 (PDT)"
        ],
        "X-Original-To": "patchwork@dpdk.org",
        "X-Received": "by 2002:a63:d415:: with SMTP id\n\ta21mr3320829pgh.229.1560874611773; \n\tTue, 18 Jun 2019 09:16:51 -0700 (PDT)",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Gm-Message-State": "APjAAAXdHw6L4+sHXEIAtdRV+eFau8aMtt47FZnDvW3HVUO9gBTijYZZ\n\tBxwlyBOmFY6nmGLjDJZm1zEOxwKi5uc=",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=9ZfM4adtNVrF7wT1Mjc0z707Ax+G9osFiWtI1ekyG9E=;\n\tb=Yh54tjXILvdDFQPPoB3a2fKmjDvgkCu57+RoowV3zaXcpwFWoRVT3wvds/FvpcG566\n\tRt8UX/SRUQSe3TGD2CVL3n9SAQBLdWBYRsIp2+Zk+FbWA7mC9ZR1tt7P4kFdYn+VWFpu\n\tgeQcnR7tQJ4BeWdvSg2C7F6tW/WbkjGSNQVSj4EckPTasR80Cw67GenwKZ3jgmcMlzoM\n\thkBFx93JfEFKQixNQNc4TWAA6UHHXL8Rtu4jYW31osdTsGD1IQUrrx/r/c5b3ssbonBo\n\tx+D2zcapLfzdGTrCzn0LmMAij13OXoPkurhtelL+y3WuwdRQMtLbx0fbPgtF2siYiiJU\n\tmJ1Q==",
        "Subject": "[dpdk-dev] [PATCH v3 6/8] kni: return -EFAULT if copy_from_user\n\tfails",
        "Date": "Tue, 18 Jun 2019 09:16:34 -0700",
        "Message-Id": "<20190618161636.23748-7-stephen@networkplumber.org>",
        "Precedence": "list",
        "X-Mailman-Version": "2.1.15",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>"
    },
    "content": "The correct thing to return if user gives a bad data\nis to return -EFAULT. Logging is also discouraged because\nit could be used as a DoS attack.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n kernel/linux/kni/kni_misc.c | 16 +++++-----------\n 1 file changed, 5 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c\nindex b59cf24c2184..be45f823408f 100644\n--- a/kernel/linux/kni/kni_misc.c\n+++ b/kernel/linux/kni/kni_misc.c\n@@ -301,11 +301,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,\n \t\treturn -EINVAL;\n \n \t/* Copy kni info from user space */\n-\tret = copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info));\n-\tif (ret) {\n-\t\tpr_err(\"copy_from_user in kni_ioctl_create\");\n-\t\treturn -EIO;\n-\t}\n+\tif (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))\n+\t\treturn -EFAULT;\n \n \t/* Check if name is zero-ended */\n \tif (strnlen(dev_info.name, sizeof(dev_info.name)) == sizeof(dev_info.name)) {\n@@ -427,15 +424,12 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,\n \tif (_IOC_SIZE(ioctl_num) > sizeof(dev_info))\n \t\treturn -EINVAL;\n \n-\tret = copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info));\n-\tif (ret) {\n-\t\tpr_err(\"copy_from_user in kni_ioctl_release\");\n-\t\treturn -EIO;\n-\t}\n+\tif (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))\n+\t\treturn -EFAULT;\n \n \t/* Release the network device according to its name */\n \tif (strlen(dev_info.name) == 0)\n-\t\treturn ret;\n+\t\treturn -EINVAL;\n \n \tdown_write(&knet->kni_list_lock);\n \tlist_for_each_entry_safe(dev, n, &knet->kni_list_head, list) {\n",
    "prefixes": [
        "v3",
        "6/8"
    ]
}