get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 806040,
    "url": "http://patchwork.ozlabs.org/api/patches/806040/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170825220310.24863-1-tracywwnj@gmail.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170825220310.24863-1-tracywwnj@gmail.com>",
    "list_archive_url": null,
    "date": "2017-08-25T22:03:10",
    "name": "[net] ipv6: fix sparse warning on rt6i_node",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "4233c628675407f81c08f3f2f4dd409ca011a4f5",
    "submitter": {
        "id": 68448,
        "url": "http://patchwork.ozlabs.org/api/people/68448/?format=api",
        "name": "Wei Wang",
        "email": "weiwan@google.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170825220310.24863-1-tracywwnj@gmail.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/806040/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806040/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"ocejnUjC\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xfFXy5lKSz9t1m\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 26 Aug 2017 08:03:30 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S935240AbdHYWD2 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 25 Aug 2017 18:03:28 -0400",
            "from mail-pg0-f42.google.com ([74.125.83.42]:33466 \"EHLO\n\tmail-pg0-f42.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S933339AbdHYWDY (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 25 Aug 2017 18:03:24 -0400",
            "by mail-pg0-f42.google.com with SMTP id t3so5587342pgt.0\n\tfor <netdev@vger.kernel.org>; Fri, 25 Aug 2017 15:03:24 -0700 (PDT)",
            "from localhost ([2620:15c:2cb:201:34af:7534:edd0:3e64])\n\tby smtp.gmail.com with ESMTPSA id\n\tv187sm11452304pgv.67.2017.08.25.15.03.22\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tFri, 25 Aug 2017 15:03:22 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=google.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=XQP7601NAl9NVigpa7JE4IgXNO3JVGgHzuSaIq4J1N0=;\n\tb=ocejnUjCXu/zJjJ165+aJKDDHQHcmTz/Z9nJsLV2ZstUgwbMHgRv82izZnQ9T5Bgb2\n\tdeTADmLUFlB+frNJ8uZOKfgNLPwYVteY11M9cESrzIos/QN2aqSn8LGc11mtO3uYy2Kf\n\t0vRkBp5opFO/R4bcAM7sGsS86nzMYdQc/fLEIj6yA9gr+usD9ntvUFr8mttzam+9na25\n\teEGz7jQTplrJAkkuwYkPpysTWnHwFXu4q4azG0pMhguPQYCpn2J+I4GXqm+AcHwYkZxC\n\txlv37d0Vv+1+/ZkFa8BWLLUlWvXwYC+SqyLUMlnbZ2DJQxp+gDskKXXj7lclDQ1dQQv5\n\tmiYA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=XQP7601NAl9NVigpa7JE4IgXNO3JVGgHzuSaIq4J1N0=;\n\tb=aTv9O1/8sCzYIfXh2zgjbLZDOkP6oL5qHvVV3w7QeqMEQtb1k0LwbwcPylaTsvp3di\n\thJsoV/Hxnee0/EN1HZD7thDrBSJb29eQZJTsNuRuyLc66kZvNMJZqEDKghRnERYkP0NQ\n\tv0Xn15VsC9jUKaFt53E93KI66OMGokWcZlqBYs0oW2CdZVCx0XEVVOmEQBFnX5viPpF3\n\tAE4p3IwkPGSLjWcqTKX/gtkSuZke4xVRVfW2gO9piQo0jb88I99Bjq3H3HBFOOtREhyX\n\tpLVZ1uAmSvQmwOF5zxAHCY+E65MIXNqjs4bK8bBAEzeJTLOIfLrajXdlVSNk4hvKInz1\n\t/S7w==",
        "X-Gm-Message-State": "AHYfb5jZ2ISptz9XLkTqHHM65gsPDwGfvNyx219DY8f/2jUspO0J52Td\n\tY7Nr4tnGC0+5kvPq",
        "X-Google-Smtp-Source": "ADKCNb7uiwA52Ha9/Y694H8wzrV6PkxBlNTizVe6YZSolzrijGzqCQZiSb7NLiG3/nh6MnJ6yt8hjw==",
        "X-Received": "by 10.99.96.16 with SMTP id u16mr10818885pgb.16.1503698603497;\n\tFri, 25 Aug 2017 15:03:23 -0700 (PDT)",
        "From": "Wei Wang <weiwan@google.com>",
        "X-Google-Original-From": "Wei Wang <tracywwnj@gmail.com>",
        "To": "David Miller <davem@davemloft.net>, netdev@vger.kernel.org",
        "Cc": "Eric Dumazet <edumazet@google.com>,\n\tMartin KaFai Lau <kafai@fb.com>, Wei Wang <weiwan@google.com>",
        "Subject": "[PATCH net] ipv6: fix sparse warning on rt6i_node",
        "Date": "Fri, 25 Aug 2017 15:03:10 -0700",
        "Message-Id": "<20170825220310.24863-1-tracywwnj@gmail.com>",
        "X-Mailer": "git-send-email 2.14.1.342.g6490525c54-goog",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "From: Wei Wang <weiwan@google.com>\n\nCommit c5cff8561d2d adds rcu grace period before freeing fib6_node. This\ngenerates a new sparse warning on rt->rt6i_node related code:\n  net/ipv6/route.c:1394:30: error: incompatible types in comparison\n  expression (different address spaces)\n  ./include/net/ip6_fib.h:187:14: error: incompatible types in comparison\n  expression (different address spaces)\n\nThis commit adds \"__rcu\" tag for rt6i_node and makes sure corresponding\nrcu API is used for it.\nAfter this fix, sparse no longer generates the above warning.\n\nFixes: c5cff8561d2d (\"ipv6: add rcu grace period before freeing fib6_node\")\nSigned-off-by: Wei Wang <weiwan@google.com>\nAcked-by: Eric Dumazet <edumazet@google.com>\n---\n include/net/ip6_fib.h |  2 +-\n net/ipv6/addrconf.c   |  2 +-\n net/ipv6/ip6_fib.c    | 11 +++++++----\n net/ipv6/route.c      |  3 ++-\n 4 files changed, 11 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h\nindex e9c59db92942..af509f801084 100644\n--- a/include/net/ip6_fib.h\n+++ b/include/net/ip6_fib.h\n@@ -105,7 +105,7 @@ struct rt6_info {\n \t * the same cache line.\n \t */\n \tstruct fib6_table\t\t*rt6i_table;\n-\tstruct fib6_node\t\t*rt6i_node;\n+\tstruct fib6_node __rcu\t\t*rt6i_node;\n \n \tstruct in6_addr\t\t\trt6i_gateway;\n \ndiff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c\nindex 3c46e9513a31..936e9ab4dda5 100644\n--- a/net/ipv6/addrconf.c\n+++ b/net/ipv6/addrconf.c\n@@ -5556,7 +5556,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)\n \t\t * our DAD process, so we don't need\n \t\t * to do it again\n \t\t */\n-\t\tif (!(ifp->rt->rt6i_node))\n+\t\tif (!rcu_access_pointer(ifp->rt->rt6i_node))\n \t\t\tip6_ins_rt(ifp->rt);\n \t\tif (ifp->idev->cnf.forwarding)\n \t\t\taddrconf_join_anycast(ifp);\ndiff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c\nindex a5ebf86f6be8..10b4b1f8b838 100644\n--- a/net/ipv6/ip6_fib.c\n+++ b/net/ipv6/ip6_fib.c\n@@ -889,7 +889,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,\n \n \t\trt->dst.rt6_next = iter;\n \t\t*ins = rt;\n-\t\trt->rt6i_node = fn;\n+\t\trcu_assign_pointer(rt->rt6i_node, fn);\n \t\tatomic_inc(&rt->rt6i_ref);\n \t\tif (!info->skip_notify)\n \t\t\tinet6_rt_notify(RTM_NEWROUTE, rt, info, nlflags);\n@@ -915,7 +915,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,\n \t\t\treturn err;\n \n \t\t*ins = rt;\n-\t\trt->rt6i_node = fn;\n+\t\trcu_assign_pointer(rt->rt6i_node, fn);\n \t\trt->dst.rt6_next = iter->dst.rt6_next;\n \t\tatomic_inc(&rt->rt6i_ref);\n \t\tif (!info->skip_notify)\n@@ -1480,8 +1480,9 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp,\n \n int fib6_del(struct rt6_info *rt, struct nl_info *info)\n {\n+\tstruct fib6_node *fn = rcu_dereference_protected(rt->rt6i_node,\n+\t\t\t\t    lockdep_is_held(&rt->rt6i_table->tb6_lock));\n \tstruct net *net = info->nl_net;\n-\tstruct fib6_node *fn = rt->rt6i_node;\n \tstruct rt6_info **rtp;\n \n #if RT6_DEBUG >= 2\n@@ -1670,7 +1671,9 @@ static int fib6_clean_node(struct fib6_walker *w)\n \t\t\tif (res) {\n #if RT6_DEBUG >= 2\n \t\t\t\tpr_debug(\"%s: del failed: rt=%p@%p err=%d\\n\",\n-\t\t\t\t\t __func__, rt, rt->rt6i_node, res);\n+\t\t\t\t\t __func__, rt,\n+\t\t\t\t\t rcu_access_pointer(rt->rt6i_node),\n+\t\t\t\t\t res);\n #endif\n \t\t\t\tcontinue;\n \t\t\t}\ndiff --git a/net/ipv6/route.c b/net/ipv6/route.c\nindex a9d3564caf49..33629f2a0f9d 100644\n--- a/net/ipv6/route.c\n+++ b/net/ipv6/route.c\n@@ -1383,7 +1383,8 @@ static void rt6_do_update_pmtu(struct rt6_info *rt, u32 mtu)\n static bool rt6_cache_allowed_for_pmtu(const struct rt6_info *rt)\n {\n \treturn !(rt->rt6i_flags & RTF_CACHE) &&\n-\t\t(rt->rt6i_flags & RTF_PCPU || rt->rt6i_node);\n+\t\t(rt->rt6i_flags & RTF_PCPU ||\n+\t\t rcu_access_pointer(rt->rt6i_node));\n }\n \n static void __ip6_rt_update_pmtu(struct dst_entry *dst, const struct sock *sk,\n",
    "prefixes": [
        "net"
    ]
}