Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/831019/?format=api
{ "id": 831019, "url": "http://patchwork.ozlabs.org/api/1.2/patches/831019/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20171027012443.3306-13-xiyou.wangcong@gmail.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20171027012443.3306-13-xiyou.wangcong@gmail.com>", "list_archive_url": null, "date": "2017-10-27T01:24:39", "name": "[net,12/16] net_sched: use tcf_queue_work() in tcindex filter", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "0f8b9c3fd7c45c4f15d922c92ee2775ff5ddefe1", "submitter": { "id": 211, "url": "http://patchwork.ozlabs.org/api/1.2/people/211/?format=api", "name": "Cong Wang", "email": "xiyou.wangcong@gmail.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/1.2/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20171027012443.3306-13-xiyou.wangcong@gmail.com/mbox/", "series": [ { "id": 10472, "url": "http://patchwork.ozlabs.org/api/1.2/series/10472/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=10472", "date": "2017-10-27T01:24:27", "name": "net_sched: fix races with RCU callbacks", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/10472/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/831019/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/831019/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=\"bNNKM1pR\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yNR5V3Cwnz9t2h\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 27 Oct 2017 12:25:34 +1100 (AEDT)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932481AbdJ0BZb (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 26 Oct 2017 21:25:31 -0400", "from mail-pg0-f68.google.com ([74.125.83.68]:49073 \"EHLO\n\tmail-pg0-f68.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S932413AbdJ0BZN (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 26 Oct 2017 21:25:13 -0400", "by mail-pg0-f68.google.com with SMTP id v78so4060054pgb.5\n\tfor <netdev@vger.kernel.org>; Thu, 26 Oct 2017 18:25:13 -0700 (PDT)", "from tw-172-25-30-113.office.twttr.net ([8.25.197.25])\n\tby smtp.gmail.com with ESMTPSA id\n\tb16sm13211973pfe.58.2017.10.26.18.25.11\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 26 Oct 2017 18:25:11 -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:in-reply-to:references;\n\tbh=w1W62E9PPHXmNr1v+aupHMECyh0+dSD/PaSQsRim3f0=;\n\tb=bNNKM1pRbuHDa98Hvh48tRBVct/MeciguJd0M6zQuO0avb+m2nrSlKBzHmXd4aJDsb\n\tnp04D+HVa7r9+2PMm5DpGAufI5je4oKROjd9WHyvfSQXju6FRIbRykve87PRRnlJ90Qw\n\thlpfby0gYZwfy0iL7dF7f+0jNNleJITOL0W1EdFYiN7h6g4bCCeLjQ5OisVV8MVYyz9r\n\t/q+lT1EezCxYL+5ecoKTrZ+8+sth+rA4wkpjRnnhIRZRvAJW+Ku1P9JiVsJdJRA52oHn\n\tHdAo88pvmxmy+yHssEbkbfFvqaPQEoqELY8RivmKrpFZhi+FSk7+dqvtxQ6dZXMsuF9e\n\ttsxA==", "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:in-reply-to\n\t:references;\n\tbh=w1W62E9PPHXmNr1v+aupHMECyh0+dSD/PaSQsRim3f0=;\n\tb=pxGXxq8DNlFd4x3nrJMz5DnkQzYGutJvWkes5QWNyd38tBDMyZJ+kirXze1OLcTKy9\n\t9g8cEObzcKJAtU4SlrI+rxKngH4uRg5XLw8KgziXrcgg04gxK/rSzsUwGmtntOJaZk5n\n\ttpakXqseOEDI4khJQIJSb30ZqYfVti2qeUEWa9GxbIuq/C7TD36eRhSfjpJCubUntRFW\n\tEfSRuW31PF4mqdDDlNJfzcujYFMFJ7LGGkN8XUrP/fG/o9YhQaWPSpv6C+AvV0ybH+Ic\n\tkRl/bjkIpBB84daroi8VkfmymRAr7tynvDM2K8/tIUOlm9NZbN4lHxXxQlDmPc66j5+p\n\tdemA==", "X-Gm-Message-State": "AMCzsaWUnUlNzO8V6VF9GubKUV2vqIVwtDQFTqCtqicUHvGYXjZ9Qimu\n\tDLm4ScxooUqPKbqwLuMnZLFm43ZF", "X-Google-Smtp-Source": "ABhQp+RmnFQ4+WR8f2ZshBudnrlGDYj/BOxXktrrVT+UBgqT8Q2f8xVBR6E7XABTe7f33RQpRTqHOQ==", "X-Received": "by 10.98.157.18 with SMTP id i18mr7350049pfd.120.1509067512682; \n\tThu, 26 Oct 2017 18:25:12 -0700 (PDT)", "From": "Cong Wang <xiyou.wangcong@gmail.com>", "To": "netdev@vger.kernel.org", "Cc": "Chris Mi <chrism@mellanox.com>, Cong Wang <xiyou.wangcong@gmail.com>,\n\tDaniel Borkmann <daniel@iogearbox.net>, Jiri Pirko <jiri@resnulli.us>,\n\tJohn Fastabend <john.fastabend@gmail.com>,\n\tJamal Hadi Salim <jhs@mojatatu.com>,\n\t\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>", "Subject": "[Patch net 12/16] net_sched: use tcf_queue_work() in tcindex filter", "Date": "Thu, 26 Oct 2017 18:24:39 -0700", "Message-Id": "<20171027012443.3306-13-xiyou.wangcong@gmail.com>", "X-Mailer": "git-send-email 2.9.4", "In-Reply-To": "<20171027012443.3306-1-xiyou.wangcong@gmail.com>", "References": "<20171027012443.3306-1-xiyou.wangcong@gmail.com>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "Defer the tcf_exts_destroy() in RCU callback to\ntc filter workqueue and get RTNL lock.\n\nReported-by: Chris Mi <chrism@mellanox.com>\nCc: Daniel Borkmann <daniel@iogearbox.net>\nCc: Jiri Pirko <jiri@resnulli.us>\nCc: John Fastabend <john.fastabend@gmail.com>\nCc: Jamal Hadi Salim <jhs@mojatatu.com>\nCc: \"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>\nSigned-off-by: Cong Wang <xiyou.wangcong@gmail.com>\n---\n net/sched/cls_tcindex.c | 38 +++++++++++++++++++++++++++++++++-----\n 1 file changed, 33 insertions(+), 5 deletions(-)", "diff": "diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c\nindex 14a7e08b2fa9..beaa95e09c25 100644\n--- a/net/sched/cls_tcindex.c\n+++ b/net/sched/cls_tcindex.c\n@@ -27,14 +27,20 @@\n struct tcindex_filter_result {\n \tstruct tcf_exts\t\texts;\n \tstruct tcf_result\tres;\n-\tstruct rcu_head\t\trcu;\n+\tunion {\n+\t\tstruct work_struct\twork;\n+\t\tstruct rcu_head\t\trcu;\n+\t};\n };\n \n struct tcindex_filter {\n \tu16 key;\n \tstruct tcindex_filter_result result;\n \tstruct tcindex_filter __rcu *next;\n-\tstruct rcu_head rcu;\n+\tunion {\n+\t\tstruct work_struct work;\n+\t\tstruct rcu_head rcu;\n+\t};\n };\n \n \n@@ -133,12 +139,34 @@ static int tcindex_init(struct tcf_proto *tp)\n \treturn 0;\n }\n \n+static void tcindex_destroy_rexts_work(struct work_struct *work)\n+{\n+\tstruct tcindex_filter_result *r;\n+\n+\tr = container_of(work, struct tcindex_filter_result, work);\n+\trtnl_lock();\n+\ttcf_exts_destroy(&r->exts);\n+\trtnl_unlock();\n+}\n+\n static void tcindex_destroy_rexts(struct rcu_head *head)\n {\n \tstruct tcindex_filter_result *r;\n \n \tr = container_of(head, struct tcindex_filter_result, rcu);\n-\ttcf_exts_destroy(&r->exts);\n+\tINIT_WORK(&r->work, tcindex_destroy_rexts_work);\n+\ttcf_queue_work(&r->work);\n+}\n+\n+static void tcindex_destroy_fexts_work(struct work_struct *work)\n+{\n+\tstruct tcindex_filter *f = container_of(work, struct tcindex_filter,\n+\t\t\t\t\t\twork);\n+\n+\trtnl_lock();\n+\ttcf_exts_destroy(&f->result.exts);\n+\tkfree(f);\n+\trtnl_unlock();\n }\n \n static void tcindex_destroy_fexts(struct rcu_head *head)\n@@ -146,8 +174,8 @@ static void tcindex_destroy_fexts(struct rcu_head *head)\n \tstruct tcindex_filter *f = container_of(head, struct tcindex_filter,\n \t\t\t\t\t\trcu);\n \n-\ttcf_exts_destroy(&f->result.exts);\n-\tkfree(f);\n+\tINIT_WORK(&f->work, tcindex_destroy_fexts_work);\n+\ttcf_queue_work(&f->work);\n }\n \n static int tcindex_delete(struct tcf_proto *tp, void *arg, bool *last)\n", "prefixes": [ "net", "12/16" ] }