get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 806117,
    "url": "http://patchwork.ozlabs.org/api/patches/806117/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/cd3d9312a3d31ee72b9377e7200898c30f73ab8e.1503749410.git.lucien.xin@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": "<cd3d9312a3d31ee72b9377e7200898c30f73ab8e.1503749410.git.lucien.xin@gmail.com>",
    "list_archive_url": null,
    "date": "2017-08-26T12:10:10",
    "name": "[net] ipv6: set dst.obsolete when a cached route has expired",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "cea30986dfd7191104789ad44bcc0c201bf0029b",
    "submitter": {
        "id": 61073,
        "url": "http://patchwork.ozlabs.org/api/people/61073/?format=api",
        "name": "Xin Long",
        "email": "lucien.xin@gmail.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/cd3d9312a3d31ee72b9377e7200898c30f73ab8e.1503749410.git.lucien.xin@gmail.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/806117/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806117/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=gmail.com header.i=@gmail.com\n\theader.b=\"qrc26xjs\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xfcM51Wq6z9t50\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 26 Aug 2017 22:11:13 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752350AbdHZMKV (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 26 Aug 2017 08:10:21 -0400",
            "from mail-pg0-f66.google.com ([74.125.83.66]:38787 \"EHLO\n\tmail-pg0-f66.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752129AbdHZMKU (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sat, 26 Aug 2017 08:10:20 -0400",
            "by mail-pg0-f66.google.com with SMTP id t3so2684583pgt.5\n\tfor <netdev@vger.kernel.org>; Sat, 26 Aug 2017 05:10:20 -0700 (PDT)",
            "from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id\n\ta69sm7744510pfg.113.2017.08.26.05.10.18\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 26 Aug 2017 05:10:18 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=E+Nd0srkyeehBmjskT+kSmBYbqpvnkBCJPU8ZT2j/g0=;\n\tb=qrc26xjsCJ7gMe1XHhPe01vMqtFzZNdg6aJJ/VQbmzIuDTO0b9dn/YdA9547UgkxzZ\n\tlcyo4wxupetuafW0HyAeU4tvlUp6Kg3pMzVmxu0HGcJalK0fRWf4ifXf/JUKn9Fzz/4s\n\tqoq7X3fm7MvINrSlHv6XtFt5WWDFrVW20AJLpacuij4qJ4b+kLi04dvZNK77XtbiboGa\n\trQeroH5a5jdPrv/4XtD3MVB11j/CmwZME1mNJYfjFaSwQbBlPeXHI+xnG5HqDJcgO8+r\n\t4fIY6JDAHfEDu9UCUwuidM/Pvdcq6NxUBRM2RL/KbBANDNUJw/MwU82KL8bPSjCvglD3\n\t+9FA==",
        "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=E+Nd0srkyeehBmjskT+kSmBYbqpvnkBCJPU8ZT2j/g0=;\n\tb=dzzra/Pw51pf0BRt8iKdNmS4WDLt0542IfF3FPZa9YggNS4+kGl+u5hSCe6r3HSMih\n\tybAccbu0cl/tZQsIrfx+G3KK067ynh1edNHqoj2YknXoQFuI8w7U3KHKXPAj4PiITTY7\n\tznl8bIJF3tctBfGI6HbTm5Td2risi1RpsHmG1UGaMiRmLzwy27Shp2PJ1e75hqoq6IoM\n\tBbaq8t9iRKthqbT6kSzKJEXp1BsEegMXr8IVb/ufarmIRvLqa+nx8+iwVQAgiVHoQzBK\n\tLPWJOjmCpOkZ876oYlG/VaUKF6pIykOVQcGUsTYYu5qcsn6m8m+qNOtwdNAhrjQlc+e6\n\tzxaw==",
        "X-Gm-Message-State": "AHYfb5iUMpONZ8ZPEfbaDwH9cnQsZ213bLjJJb0mACCiPFRwBoa6ZHxy\n\tyGXnx0hkkUGTJQbnxkQ=",
        "X-Received": "by 10.99.175.1 with SMTP id w1mr1511679pge.389.1503749419464;\n\tSat, 26 Aug 2017 05:10:19 -0700 (PDT)",
        "From": "Xin Long <lucien.xin@gmail.com>",
        "To": "network dev <netdev@vger.kernel.org>",
        "Cc": "davem@davemloft.net, hannes@stressinduktion.org",
        "Subject": "[PATCH net] ipv6: set dst.obsolete when a cached route has expired",
        "Date": "Sat, 26 Aug 2017 20:10:10 +0800",
        "Message-Id": "<cd3d9312a3d31ee72b9377e7200898c30f73ab8e.1503749410.git.lucien.xin@gmail.com>",
        "X-Mailer": "git-send-email 2.1.0",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "Now it doesn't check for the cached route expiration in ipv6's\ndst_ops->check(), because it trusts dst_gc that would clean the\ncached route up when it's expired.\n\nThe problem is in dst_gc, it would clean the cached route only\nwhen it's refcount is 1. If some other module (like xfrm) keeps\nholding it and the module only release it when dst_ops->check()\nfails.\n\nBut without checking for the cached route expiration, .check()\nmay always return true. Meanwhile, without releasing the cached\nroute, dst_gc couldn't del it. It will cause this cached route\nnever to expire.\n\nThis patch is to set dst.obsolete with DST_OBSOLETE_KILL in .gc\nwhen it's expired, and check obsolete != DST_OBSOLETE_FORCE_CHK\nin .check.\n\nNote that this is even needed when ipv6 dst_gc timer is removed\none day. It would set dst.obsolete in .redirect and .update_pmtu\ninstead, and check for cached route expiration when getting it,\njust like what ipv4 route does.\n\nReported-by: Jianlin Shi <jishi@redhat.com>\nSigned-off-by: Xin Long <lucien.xin@gmail.com>\nAcked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>\n---\n net/ipv6/ip6_fib.c | 4 +++-\n net/ipv6/route.c   | 3 ++-\n 2 files changed, 5 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c\nindex a5ebf86..18567b8 100644\n--- a/net/ipv6/ip6_fib.c\n+++ b/net/ipv6/ip6_fib.c\n@@ -1792,8 +1792,10 @@ static int fib6_age(struct rt6_info *rt, void *arg)\n \t\t}\n \t\tgc_args->more++;\n \t} else if (rt->rt6i_flags & RTF_CACHE) {\n+\t\tif (time_after_eq(now, rt->dst.lastuse + gc_args->timeout))\n+\t\t\trt->dst.obsolete = DST_OBSOLETE_KILL;\n \t\tif (atomic_read(&rt->dst.__refcnt) == 1 &&\n-\t\t    time_after_eq(now, rt->dst.lastuse + gc_args->timeout)) {\n+\t\t    rt->dst.obsolete == DST_OBSOLETE_KILL) {\n \t\t\tRT6_TRACE(\"aging clone %p\\n\", rt);\n \t\t\treturn -1;\n \t\t} else if (rt->rt6i_flags & RTF_GATEWAY) {\ndiff --git a/net/ipv6/route.c b/net/ipv6/route.c\nindex 48c8c92..7c634b6 100644\n--- a/net/ipv6/route.c\n+++ b/net/ipv6/route.c\n@@ -440,7 +440,8 @@ static bool rt6_check_expired(const struct rt6_info *rt)\n \t\tif (time_after(jiffies, rt->dst.expires))\n \t\t\treturn true;\n \t} else if (rt->dst.from) {\n-\t\treturn rt6_check_expired((struct rt6_info *) rt->dst.from);\n+\t\treturn rt->dst.obsolete != DST_OBSOLETE_FORCE_CHK ||\n+\t\t       rt6_check_expired((struct rt6_info *)rt->dst.from);\n \t}\n \treturn false;\n }\n",
    "prefixes": [
        "net"
    ]
}