get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 69604,
    "url": "http://patches.dpdk.org/api/patches/69604/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1588253872-19024-1-git-send-email-yuanlinsi01@baidu.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": "<1588253872-19024-1-git-send-email-yuanlinsi01@baidu.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1588253872-19024-1-git-send-email-yuanlinsi01@baidu.com",
    "date": "2020-04-30T13:37:52",
    "name": "net/bnxt: fix a possible stack smashing",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1ba0702764d862ea23753c75d8e8f0751f16ca14",
    "submitter": {
        "id": 1693,
        "url": "http://patches.dpdk.org/api/people/1693/?format=api",
        "name": "Yuan Linsi",
        "email": "yuanlinsi01@baidu.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1588253872-19024-1-git-send-email-yuanlinsi01@baidu.com/mbox/",
    "series": [
        {
            "id": 9767,
            "url": "http://patches.dpdk.org/api/series/9767/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9767",
            "date": "2020-04-30T13:37:52",
            "name": "net/bnxt: fix a possible stack smashing",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/9767/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/69604/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/69604/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 74A99A00C5;\n\tThu, 30 Apr 2020 15:37:58 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D586F1DBBF;\n\tThu, 30 Apr 2020 15:37:57 +0200 (CEST)",
            "from tc-sys-mailedm03.tc.baidu.com (mx134-tc.baidu.com\n [61.135.168.134]) by dpdk.org (Postfix) with ESMTP id 3BDD01DBB6\n for <dev@dpdk.org>; Thu, 30 Apr 2020 15:37:55 +0200 (CEST)",
            "from localhost (cp01-cos-dev01.cp01.baidu.com [10.92.119.46])\n by tc-sys-mailedm03.tc.baidu.com (Postfix) with ESMTP id 5D9984500031;\n Thu, 30 Apr 2020 21:37:52 +0800 (CST)"
        ],
        "From": "Yuan Linsi <yuanlinsi01@baidu.com>",
        "To": "ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com,\n lance.richardson@broadcom.com",
        "Cc": "dev@dpdk.org",
        "Date": "Thu, 30 Apr 2020 21:37:52 +0800",
        "Message-Id": "<1588253872-19024-1-git-send-email-yuanlinsi01@baidu.com>",
        "X-Mailer": "git-send-email 1.7.1",
        "Subject": "[dpdk-dev] [PATCH] net/bnxt: fix a possible stack smashing",
        "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 <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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: yuanlinsi01 <yuanlinsi01@baidu.com>\n\nWe see a stack smashing as a result of defensive code missing. Once the\nnb_pkts is less than RTE_BNXT_DESCS_PER_LOOP, it will be modified to\nzero after doing a floor align, and we can not exit the following\nreceiving packets loop. And the buffers will be overwrite, then the\nstack frame was ruined.\n\nFix the problem by adding defensive code, once the nb_pkts is zero, just\ndirectly return with no packets.\n\nFixes: bc4a000f2 (\"net/bnxt: implement SSE vector mode\")\nCc: stable@dpdk.org\n\nSigned-off-by: yuanlinsi01 <yuanlinsi01@baidu.com>\nSigned-off-by: rongdongsheng <rongdongsheng@baidu.com>\n---\n drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c\nindex d0e7910e7..8f73add9b 100644\n--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c\n+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c\n@@ -233,8 +233,13 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t/* Return no more than RTE_BNXT_MAX_RX_BURST per call. */\n \tnb_pkts = RTE_MIN(nb_pkts, RTE_BNXT_MAX_RX_BURST);\n \n-\t/* Make nb_pkts an integer multiple of RTE_BNXT_DESCS_PER_LOOP */\n+\t/*\n+\t * Make nb_pkts an integer multiple of RTE_BNXT_DESCS_PER_LOOP.\n+\t * nb_pkts < RTE_BNXT_DESCS_PER_LOOP, just return no packet\n+\t */\n \tnb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_BNXT_DESCS_PER_LOOP);\n+\tif (!nb_pkts)\n+\t\treturn 0;\n \n \t/* Handle RX burst request */\n \twhile (1) {\n",
    "prefixes": []
}