Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/53097/?format=api
http://patchwork.dpdk.org/api/patches/53097/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190426084415.3979-1-david.hunt@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": "<20190426084415.3979-1-david.hunt@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190426084415.3979-1-david.hunt@intel.com", "date": "2019-04-26T08:44:15", "name": "[v1] examples/vm_power_manager: fix overflowed return value", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": true, "hash": "5ec974ca702b42f51250c62e99be4b3acb4fc2e4", "submitter": { "id": 342, "url": "http://patchwork.dpdk.org/api/people/342/?format=api", "name": "Hunt, David", "email": "david.hunt@intel.com" }, "delegate": null, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190426084415.3979-1-david.hunt@intel.com/mbox/", "series": [ { "id": 4476, "url": "http://patchwork.dpdk.org/api/series/4476/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=4476", "date": "2019-04-26T08:44:15", "name": "[v1] examples/vm_power_manager: fix overflowed return value", "version": 1, "mbox": "http://patchwork.dpdk.org/series/4476/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/53097/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/53097/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 28AB31B596;\n\tFri, 26 Apr 2019 10:44:21 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 999B11B101;\n\tFri, 26 Apr 2019 10:44:19 +0200 (CEST)", "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Apr 2019 01:44:18 -0700", "from silpixa00399952.ir.intel.com (HELO\n\tsilpixa00399952.ger.corp.intel.com) ([10.237.223.64])\n\tby fmsmga007.fm.intel.com with ESMTP; 26 Apr 2019 01:44:17 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.60,396,1549958400\"; d=\"scan'208\";a=\"146003359\"", "From": "David Hunt <david.hunt@intel.com>", "To": "dev@dpdk.org", "Cc": "david.hunt@intel.com,\n\tstable@dpdk.org", "Date": "Fri, 26 Apr 2019 09:44:15 +0100", "Message-Id": "<20190426084415.3979-1-david.hunt@intel.com>", "X-Mailer": "git-send-email 2.17.1", "Subject": "[dpdk-dev] [PATCH v1] examples/vm_power_manager: fix overflowed\n\treturn value", "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": "Coverity complains about the return of a value that may\npossibly overflow because of a multiply. Limit the value\nso it cannot overflow.\n\nCoverity issue: 337677\nFixes: 4b1a631b8a (\"examples/vm_power: add oob monitoring functions\")\nCC: stable@dpdk.org\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n examples/vm_power_manager/oob_monitor_x86.c | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)", "diff": "diff --git a/examples/vm_power_manager/oob_monitor_x86.c b/examples/vm_power_manager/oob_monitor_x86.c\nindex ebd96b205..2074eec1e 100644\n--- a/examples/vm_power_manager/oob_monitor_x86.c\n+++ b/examples/vm_power_manager/oob_monitor_x86.c\n@@ -99,7 +99,10 @@ apply_policy(int core)\n \t\treturn -1.0;\n \t}\n \n-\tratio = (float)miss_diff * (float)100 / (float)hits_diff;\n+\tratio = (float)miss_diff / (float)hits_diff;\n+\tif (ratio > 1.0)\n+\t\tratio = 1.0;\n+\tratio *= 100.0f;\n \n \tif (ratio < ci->branch_ratio_threshold)\n \t\tpower_manager_scale_core_min(core);\n", "prefixes": [ "v1" ] }{ "id": 53097, "url": "