get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 972066,
    "url": "http://patchwork.ozlabs.org/api/patches/972066/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180920004308.13772-13-anirudh.venkataramanan@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20180920004308.13772-13-anirudh.venkataramanan@intel.com>",
    "list_archive_url": null,
    "date": "2018-09-20T00:43:04",
    "name": "[v2,12/16] ice: Fix potential null pointer issues",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "65f601035ee4681f1fb99cc85a1d6d53ecec3217",
    "submitter": {
        "id": 73601,
        "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api",
        "name": "Anirudh Venkataramanan",
        "email": "anirudh.venkataramanan@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180920004308.13772-13-anirudh.venkataramanan@intel.com/mbox/",
    "series": [
        {
            "id": 66527,
            "url": "http://patchwork.ozlabs.org/api/series/66527/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=66527",
            "date": "2018-09-20T00:42:53",
            "name": "Add SR-IOV support, feature updates",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/66527/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/972066/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/972066/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 42FydJ4ZTWz9sBJ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 20 Sep 2018 10:43:16 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 3C8AD87599;\n\tThu, 20 Sep 2018 00:43:15 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 1o2mIsKv8xot; Thu, 20 Sep 2018 00:43:13 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D6456876EF;\n\tThu, 20 Sep 2018 00:43:13 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id E48B81C08AF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Sep 2018 00:43:11 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E2B4288AF1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Sep 2018 00:43:11 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id KO4FNU7ytTa5 for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Sep 2018 00:43:11 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 1E01E88AEA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Sep 2018 00:43:11 +0000 (UTC)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Sep 2018 17:43:10 -0700",
            "from shasta.jf.intel.com ([10.166.241.11])\n\tby orsmga004.jf.intel.com with ESMTP; 19 Sep 2018 17:43:09 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,396,1531810800\"; d=\"scan'208\";a=\"234371602\"",
        "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 19 Sep 2018 17:43:04 -0700",
        "Message-Id": "<20180920004308.13772-13-anirudh.venkataramanan@intel.com>",
        "X-Mailer": "git-send-email 2.14.3",
        "In-Reply-To": "<20180920004308.13772-1-anirudh.venkataramanan@intel.com>",
        "References": "<20180920004308.13772-1-anirudh.venkataramanan@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH v2 12/16] ice: Fix potential null pointer\n\tissues",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Dave Ertman <david.m.ertman@intel.com>\n\nAdd checks in the filter handling flow to avoid dereferencing\nNULL pointers.\n\nSigned-off-by: Dave Ertman <david.m.ertman@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n[Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> minor cleanup for upstream submission]\n---\n drivers/net/ethernet/intel/ice/ice_switch.c | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c\nindex c6d673bd5eaa..2a3d4a72ab3c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_switch.c\n+++ b/drivers/net/ethernet/intel/ice/ice_switch.c\n@@ -2010,12 +2010,12 @@ ice_cfg_dflt_vsi(struct ice_hw *hw, u16 vsi_handle, bool set, u8 direction)\n enum ice_status\n ice_remove_mac(struct ice_hw *hw, struct list_head *m_list)\n {\n-\tstruct ice_fltr_list_entry *list_itr;\n+\tstruct ice_fltr_list_entry *list_itr, *tmp;\n \n \tif (!m_list)\n \t\treturn ICE_ERR_PARAM;\n \n-\tlist_for_each_entry(list_itr, m_list, list_entry) {\n+\tlist_for_each_entry_safe(list_itr, tmp, m_list, list_entry) {\n \t\tenum ice_sw_lkup_type l_type = list_itr->fltr_info.lkup_type;\n \n \t\tif (l_type != ICE_SW_LKUP_MAC)\n@@ -2037,12 +2037,12 @@ ice_remove_mac(struct ice_hw *hw, struct list_head *m_list)\n enum ice_status\n ice_remove_vlan(struct ice_hw *hw, struct list_head *v_list)\n {\n-\tstruct ice_fltr_list_entry *v_list_itr;\n+\tstruct ice_fltr_list_entry *v_list_itr, *tmp;\n \n \tif (!v_list || !hw)\n \t\treturn ICE_ERR_PARAM;\n \n-\tlist_for_each_entry(v_list_itr, v_list, list_entry) {\n+\tlist_for_each_entry_safe(v_list_itr, tmp, v_list, list_entry) {\n \t\tenum ice_sw_lkup_type l_type = v_list_itr->fltr_info.lkup_type;\n \n \t\tif (l_type != ICE_SW_LKUP_VLAN)\n@@ -2142,7 +2142,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,\n \t\tstruct ice_fltr_info *fi;\n \n \t\tfi = &fm_entry->fltr_info;\n-\t\tif (!ice_vsi_uses_fltr(fm_entry, vsi_handle))\n+\t\tif (!fi || !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@@ -2259,7 +2259,8 @@ ice_replay_vsi_fltr(struct ice_hw *hw, u16 vsi_handle, u8 recp_id,\n \t\t\t\tgoto end;\n \t\t\tcontinue;\n \t\t}\n-\t\tif (!test_bit(vsi_handle, itr->vsi_list_info->vsi_map))\n+\t\tif (!itr->vsi_list_info ||\n+\t\t    !test_bit(vsi_handle, itr->vsi_list_info->vsi_map))\n \t\t\tcontinue;\n \t\t/* Clearing it so that the logic can add it back */\n \t\tclear_bit(vsi_handle, itr->vsi_list_info->vsi_map);\n",
    "prefixes": [
        "v2",
        "12/16"
    ]
}