get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 47314,
    "url": "http://patches.dpdk.org/api/patches/47314/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20181024100517.17494-1-dariusz.stojaczyk@intel.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": "<20181024100517.17494-1-dariusz.stojaczyk@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20181024100517.17494-1-dariusz.stojaczyk@intel.com",
    "date": "2018-10-24T10:05:17",
    "name": "ipc: fix undefined behavior in no-shconf mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "737442c56637153e157943220b73e2c47d783fb3",
    "submitter": {
        "id": 1123,
        "url": "http://patches.dpdk.org/api/people/1123/?format=api",
        "name": "Stojaczyk, Dariusz",
        "email": "dariusz.stojaczyk@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20181024100517.17494-1-dariusz.stojaczyk@intel.com/mbox/",
    "series": [
        {
            "id": 2063,
            "url": "http://patches.dpdk.org/api/series/2063/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2063",
            "date": "2018-10-24T10:05:17",
            "name": "ipc: fix undefined behavior in no-shconf mode",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/2063/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/47314/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/47314/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 A342B1B11B;\n\tWed, 24 Oct 2018 12:10:29 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id C05621B114;\n\tWed, 24 Oct 2018 12:10:27 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Oct 2018 03:10:26 -0700",
            "from violet.igk.intel.com ([10.102.54.177])\n\tby FMSMGA003.fm.intel.com with ESMTP; 24 Oct 2018 03:10:25 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,420,1534834800\"; d=\"scan'208\";a=\"90827097\"",
        "From": "Darek Stojaczyk <dariusz.stojaczyk@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Darek Stojaczyk <dariusz.stojaczyk@intel.com>, anatoly.burakov@intel.com,\n\tstable@dpdk.org",
        "Date": "Wed, 24 Oct 2018 12:05:17 +0200",
        "Message-Id": "<20181024100517.17494-1-dariusz.stojaczyk@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH] ipc: fix undefined behavior in no-shconf mode",
        "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": "In no-shconf mode the rte_mp_request_sync() wasn't initializing\nthe `reply` parameter, which contained e.g. a number of sent\nrequests. Callers of rte_mp_request_sync() might check that\nparam afterwards and might read potentially unitialized memory.\n\nThe no-shconf check that makes us return early (with rc = 0) was\nplaced before the `reply` initialization. Fix this by making the\n`reply` initialization occur first.\n\nFixes: 5848e3d2813c (\"ipc: support --no-shconf mode\")\nCc: anatoly.burakov@intel.com\nCc: stable@dpdk.org\n\nSigned-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>\n---\n lib/librte_eal/common/eal_common_proc.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c\nindex 9fcb91219..97663d3ba 100644\n--- a/lib/librte_eal/common/eal_common_proc.c\n+++ b/lib/librte_eal/common/eal_common_proc.c\n@@ -939,13 +939,17 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n \tif (check_input(req) == false)\n \t\treturn -1;\n \n+\treply->nb_sent = 0;\n+\treply->nb_received = 0;\n+\treply->msgs = NULL;\n+\n \tif (internal_config.no_shconf) {\n \t\tRTE_LOG(DEBUG, EAL, \"No shared files mode enabled, IPC is disabled\\n\");\n \t\treturn 0;\n \t}\n \n \tif (gettimeofday(&now, NULL) < 0) {\n-\t\tRTE_LOG(ERR, EAL, \"Faile to get current time\\n\");\n+\t\tRTE_LOG(ERR, EAL, \"Failed to get current time\\n\");\n \t\trte_errno = errno;\n \t\treturn -1;\n \t}\n@@ -954,10 +958,6 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n \tend.tv_sec = now.tv_sec + ts->tv_sec +\n \t\t\t(now.tv_usec * 1000 + ts->tv_nsec) / 1000000000;\n \n-\treply->nb_sent = 0;\n-\treply->nb_received = 0;\n-\treply->msgs = NULL;\n-\n \t/* for secondary process, send request to the primary process only */\n \tif (rte_eal_process_type() == RTE_PROC_SECONDARY) {\n \t\tpthread_mutex_lock(&pending_requests.lock);\n",
    "prefixes": []
}