Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/805931/?format=api
{ "id": 805931, "url": "http://patchwork.ozlabs.org/api/patches/805931/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/f61836d2323fdad4f7f9cd45e501c763369adcc8.1503671776.git.g.nault@alphalink.fr/", "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": "<f61836d2323fdad4f7f9cd45e501c763369adcc8.1503671776.git.g.nault@alphalink.fr>", "list_archive_url": null, "date": "2017-08-25T14:51:42", "name": "[net,2/5] l2tp: hold tunnel while processing genl delete command", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "04dbb098bbaef0e0e12faed8f4dd4aa368adf73e", "submitter": { "id": 22975, "url": "http://patchwork.ozlabs.org/api/people/22975/?format=api", "name": "Guillaume Nault", "email": "g.nault@alphalink.fr" }, "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/f61836d2323fdad4f7f9cd45e501c763369adcc8.1503671776.git.g.nault@alphalink.fr/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/805931/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/805931/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>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xf3z73Q2Gz9sN5\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 26 Aug 2017 00:52:03 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1757298AbdHYOv5 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 25 Aug 2017 10:51:57 -0400", "from zimbra.alphalink.fr ([217.15.80.77]:53442 \"EHLO\n\tzimbra.alphalink.fr\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756459AbdHYOvz (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 25 Aug 2017 10:51:55 -0400", "from localhost (localhost [127.0.0.1])\n\tby mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id\n\t10AC12B5214C; Fri, 25 Aug 2017 16:51:54 +0200 (CEST)", "from zimbra.alphalink.fr ([127.0.0.1])\n\tby localhost (mail-2-cbv2.admin.alphalink.fr [127.0.0.1])\n\t(amavisd-new, port 10032)\n\twith ESMTP id 21CN5Nn6rz6H; Fri, 25 Aug 2017 16:51:47 +0200 (CEST)", "from localhost (localhost [127.0.0.1])\n\tby mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id\n\t7A4DE2B5214E; Fri, 25 Aug 2017 16:51:47 +0200 (CEST)", "from zimbra.alphalink.fr ([127.0.0.1])\n\tby localhost (mail-2-cbv2.admin.alphalink.fr [127.0.0.1])\n\t(amavisd-new, port 10026)\n\twith ESMTP id 0hrz7xHudhYS; Fri, 25 Aug 2017 16:51:47 +0200 (CEST)", "from c-dev-0.admin.alphalink.fr (94-84-15-217.reverse.alphalink.fr\n\t[217.15.84.94])\n\tby mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id\n\t480852B52097; Fri, 25 Aug 2017 16:51:47 +0200 (CEST)", "by c-dev-0.admin.alphalink.fr (Postfix, from userid 1000)\n\tid 2767460176; Fri, 25 Aug 2017 16:51:42 +0200 (CEST)" ], "X-Virus-Scanned": "amavisd-new at mail-2-cbv2.admin.alphalink.fr", "Date": "Fri, 25 Aug 2017 16:51:42 +0200", "From": "Guillaume Nault <g.nault@alphalink.fr>", "To": "netdev@vger.kernel.org", "Cc": "James Chapman <jchapman@katalix.com>", "Subject": "[PATCH net 2/5] l2tp: hold tunnel while processing genl delete\n\tcommand", "Message-ID": "<f61836d2323fdad4f7f9cd45e501c763369adcc8.1503671776.git.g.nault@alphalink.fr>", "References": "<cover.1503671776.git.g.nault@alphalink.fr>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=us-ascii", "Content-Disposition": "inline", "In-Reply-To": "<cover.1503671776.git.g.nault@alphalink.fr>", "X-Mutt-Fcc": "=Sent", "User-Agent": "NeoMutt/20170609 (1.8.3)", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "l2tp_nl_cmd_tunnel_delete() needs to take a reference on the tunnel, to\nprevent it from being concurrently freed by l2tp_tunnel_destruct().\n\nFixes: 309795f4bec2 (\"l2tp: Add netlink control API for L2TP\")\nSigned-off-by: Guillaume Nault <g.nault@alphalink.fr>\n---\n net/l2tp/l2tp_netlink.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)", "diff": "diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c\nindex 27ee94b5c189..808966550620 100644\n--- a/net/l2tp/l2tp_netlink.c\n+++ b/net/l2tp/l2tp_netlink.c\n@@ -273,8 +273,8 @@ static int l2tp_nl_cmd_tunnel_delete(struct sk_buff *skb, struct genl_info *info\n \t}\n \ttunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_CONN_ID]);\n \n-\ttunnel = l2tp_tunnel_find(net, tunnel_id);\n-\tif (tunnel == NULL) {\n+\ttunnel = l2tp_tunnel_get(net, tunnel_id);\n+\tif (!tunnel) {\n \t\tret = -ENODEV;\n \t\tgoto out;\n \t}\n@@ -284,6 +284,8 @@ static int l2tp_nl_cmd_tunnel_delete(struct sk_buff *skb, struct genl_info *info\n \n \t(void) l2tp_tunnel_delete(tunnel);\n \n+\tl2tp_tunnel_dec_refcount(tunnel);\n+\n out:\n \treturn ret;\n }\n", "prefixes": [ "net", "2/5" ] }