Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/85178/?format=api
http://patches.dpdk.org/api/patches/85178/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201215060519.302145-22-qi.z.zhang@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": "<20201215060519.302145-22-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201215060519.302145-22-qi.z.zhang@intel.com", "date": "2020-12-15T06:05:13", "name": "[21/27] net/ice/base: fix for dereference of null pointer", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "01c34648ebe3b92d62a2dd54a49eb2379ee7dc51", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": { "id": 1540, "url": "http://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201215060519.302145-22-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 14300, "url": "http://patches.dpdk.org/api/series/14300/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14300", "date": "2020-12-15T06:04:52", "name": "ice base code update", "version": 1, "mbox": "http://patches.dpdk.org/series/14300/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/85178/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/85178/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 365A8A09E9;\n\tTue, 15 Dec 2020 07:08:55 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E23F8C9FC;\n\tTue, 15 Dec 2020 07:02:05 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id CB272CA68;\n Tue, 15 Dec 2020 07:02:01 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Dec 2020 22:02:01 -0800", "from dpdk51.sh.intel.com ([10.67.111.142])\n by orsmga002.jf.intel.com with ESMTP; 14 Dec 2020 22:01:59 -0800" ], "IronPort-SDR": [ "\n rRgnfsQ98DbOu0d9b5SRaLWIeEKrV/Z6kZ44mXi2rYlJZWaVOJcZNu16zWiFepWEUxsEkbuCNK\n 37rN9nxH3J+Q==", "\n kvSb+EQ9IlKP9LM5ILBXd6Ft6bgsSEF1yvqQw5hU3Hgw+2IpbUKm9NIqVieM8//GrpPGp1KUB8\n j4Wuzo1Lv/WA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9835\"; a=\"193200306\"", "E=Sophos;i=\"5.78,420,1599548400\"; d=\"scan'208\";a=\"193200306\"", "E=Sophos;i=\"5.78,420,1599548400\"; d=\"scan'208\";a=\"351723713\"" ], "X-ExtLoop1": "1", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "qiming.yang@intel.com", "Cc": "dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>, stable@dpdk.org,\n\t=?utf-8?q?Jacek_Bu=C5=82atek?= <jacekx.bulatek@intel.com>,\n Haiyue Wang <haiyue.wang@intel.com>", "Date": "Tue, 15 Dec 2020 14:05:13 +0800", "Message-Id": "<20201215060519.302145-22-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.26.2", "In-Reply-To": "<20201215060519.302145-1-qi.z.zhang@intel.com>", "References": "<20201215060519.302145-1-qi.z.zhang@intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 21/27] net/ice/base: fix for dereference of null\n\tpointer", "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": "Added handling of allocation fault for ice_vsi_list_map_info\nShould also check dereference of NULL pointer to filters VSI list\ninformation for FWD_TO_VSI_LISt type only, otherwise, the FWD_TO_VSI type\nfilters by the given VSI can't be located.\n\nAlso the point *pi should not be NULL pointer, it is a reference to raw\ndata field, so remove this variable, use the reference directly.\n\nFixes: c7dd15931183 (\"net/ice/base: add virtual switch code\")\nCc: stable@dpdk.org\n\nSigned-off-by: Jacek Bułatek <jacekx.bulatek@intel.com>\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/ice/base/ice_switch.c | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 45c44ca256..fd2c1ccceb 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -4090,6 +4090,9 @@ ice_add_update_vsi_list(struct ice_hw *hw,\n \t\t\tice_create_vsi_list_map(hw, &vsi_handle_arr[0], 2,\n \t\t\t\t\t\tvsi_list_id);\n \n+\t\tif (!m_entry->vsi_list_info)\n+\t\t\treturn ICE_ERR_NO_MEMORY;\n+\n \t\t/* If this entry was large action then the large action needs\n \t\t * to be updated to point to FWD to VSI list\n \t\t */\n@@ -5423,6 +5426,7 @@ ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)\n \treturn ((fm_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI &&\n \t\t fm_entry->fltr_info.vsi_handle == vsi_handle) ||\n \t\t(fm_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI_LIST &&\n+\t\t fm_entry->vsi_list_info &&\n \t\t (ice_is_bit_set(fm_entry->vsi_list_info->vsi_map,\n \t\t\t\t vsi_handle))));\n }\n@@ -5497,14 +5501,12 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,\n \n \tLIST_FOR_EACH_ENTRY(fm_entry, lkup_list_head,\n \t\t\t ice_fltr_mgmt_list_entry, list_entry) {\n-\t\tstruct ice_fltr_info *fi;\n-\n-\t\tfi = &fm_entry->fltr_info;\n-\t\tif (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))\n+\t\tif (!ice_vsi_uses_fltr(fm_entry, vsi_handle))\n \t\t\tcontinue;\n \n \t\tstatus = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,\n-\t\t\t\t\t\t\tvsi_list_head, fi);\n+\t\t\t\t\t\t\tvsi_list_head,\n+\t\t\t\t\t\t\t&fm_entry->fltr_info);\n \t\tif (status)\n \t\t\treturn status;\n \t}\n", "prefixes": [ "21/27" ] }{ "id": 85178, "url": "