Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/88021/?format=api
http://patchwork.dpdk.org/api/patches/88021/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/cf6bb1eb3f5e4740b462998df559ce3b2247a3bb.1613757281.git.anatoly.burakov@intel.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": "<cf6bb1eb3f5e4740b462998df559ce3b2247a3bb.1613757281.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/cf6bb1eb3f5e4740b462998df559ce3b2247a3bb.1613757281.git.anatoly.burakov@intel.com", "date": "2021-02-19T17:54:45", "name": "fbarray: fix uninitialized variable usage", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9d35269675eedf4f5d8016bf7c1d8ea0402f86fb", "submitter": { "id": 4, "url": "http://patchwork.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.com" }, "delegate": { "id": 24651, "url": "http://patchwork.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/cf6bb1eb3f5e4740b462998df559ce3b2247a3bb.1613757281.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 15307, "url": "http://patchwork.dpdk.org/api/series/15307/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=15307", "date": "2021-02-19T17:54:45", "name": "fbarray: fix uninitialized variable usage", "version": 1, "mbox": "http://patchwork.dpdk.org/series/15307/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/88021/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/88021/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 51B77A0524;\n\tFri, 19 Feb 2021 18:54:51 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BF714160964;\n\tFri, 19 Feb 2021 18:54:50 +0100 (CET)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by mails.dpdk.org (Postfix) with ESMTP id 5F9CD160962;\n Fri, 19 Feb 2021 18:54:48 +0100 (CET)", "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2021 09:54:47 -0800", "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.93])\n by orsmga005.jf.intel.com with ESMTP; 19 Feb 2021 09:54:46 -0800" ], "IronPort-SDR": [ "\n OUAUy+Mva1bu1CKYPwrVfPauYIevJ8i6eXYpvLU+t5OKLXU+Gw9D3sZs54wOMaqX+ILf1a/SWd\n D1wsKkTjkz8w==", "\n S3pULs6VUlrLre911zryJRb9G7h0FYrC/irkBI52jlWq3Y0rl5Jfd9I5veE0XFl3NkM5omQKzl\n OBYXnteTJSlQ==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9900\"; a=\"181361790\"", "E=Sophos;i=\"5.81,189,1610438400\"; d=\"scan'208\";a=\"181361790\"", "E=Sophos;i=\"5.81,189,1610438400\"; d=\"scan'208\";a=\"581763990\"" ], "X-ExtLoop1": "1", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "stable@dpdk.org", "Date": "Fri, 19 Feb 2021 17:54:45 +0000", "Message-Id": "\n <cf6bb1eb3f5e4740b462998df559ce3b2247a3bb.1613757281.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] fbarray: fix uninitialized variable usage", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "When file truncation fails, the log message attempts to print a path of\nfile we failed to truncate, but this path was never set to anything and,\nwhat's worse, was uninitialized. Fix it by passing path from the caller.\n\nFixes: c44d09811b40 (\"eal: add shared indexed file-backed array\")\nCc: stable@dpdk.org\nCoverity ID: 366122\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/eal_common_fbarray.c | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c\nindex d974f3dab7..592ec58594 100644\n--- a/lib/librte_eal/common/eal_common_fbarray.c\n+++ b/lib/librte_eal/common/eal_common_fbarray.c\n@@ -81,9 +81,8 @@ get_used_mask(void *data, unsigned int elt_sz, unsigned int len)\n }\n \n static int\n-resize_and_map(int fd, void *addr, size_t len)\n+resize_and_map(int fd, const char *path, void *addr, size_t len)\n {\n-\tchar path[PATH_MAX];\n \tvoid *map_addr;\n \n \tif (eal_file_truncate(fd, len)) {\n@@ -792,7 +791,7 @@ rte_fbarray_init(struct rte_fbarray *arr, const char *name, unsigned int len,\n \t\tif (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN))\n \t\t\tgoto fail;\n \n-\t\tif (resize_and_map(fd, data, mmap_len))\n+\t\tif (resize_and_map(fd, path, data, mmap_len))\n \t\t\tgoto fail;\n \t}\n \tma->addr = data;\n@@ -895,7 +894,7 @@ rte_fbarray_attach(struct rte_fbarray *arr)\n \tif (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN))\n \t\tgoto fail;\n \n-\tif (resize_and_map(fd, data, mmap_len))\n+\tif (resize_and_map(fd, path, data, mmap_len))\n \t\tgoto fail;\n \n \t/* store our new memory area */\n", "prefixes": [] }{ "id": 88021, "url": "