)]}'
{
  "commit": "e4b95c41df36befcfd117210900cd790bc2cd048",
  "tree": "53d51109b9ec8ebc29f14fc9689671cda519556a",
  "parents": [
    "c7e460ce55724d4e4e22d3126e5c47273819c53a"
  ],
  "author": {
    "name": "Cong Wang",
    "email": "xiyou.wangcong@gmail.com",
    "time": "Mon Nov 06 13:47:19 2017 -0800"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Thu Nov 09 10:03:09 2017 +0900"
  },
  "message": "net_sched: introduce tcf_exts_get_net() and tcf_exts_put_net()\n\nInstead of holding netns refcnt in tc actions, we can minimize\nthe holding time by saving it in struct tcf_exts instead. This\nmeans we can just hold netns refcnt right before call_rcu() and\nrelease it after tcf_exts_destroy() is done.\n\nHowever, because on netns cleanup path we call tcf_proto_destroy()\ntoo, obviously we can not hold netns for a zero refcnt, in this\ncase we have to do cleanup synchronously. It is fine for RCU too,\nthe caller cleanup_net() already waits for a grace period.\n\nFor other cases, refcnt is non-zero and we can safely grab it as\nnormal and release it after we are done.\n\nThis patch provides two new API for each filter to use:\ntcf_exts_get_net() and tcf_exts_put_net(). And all filters now can\nuse the following pattern:\n\nvoid __destroy_filter() {\n  tcf_exts_destroy();\n  tcf_exts_put_net();  // \u003c\u003d\u003d release netns refcnt\n  kfree();\n}\nvoid some_work() {\n  rtnl_lock();\n  __destroy_filter();\n  rtnl_unlock();\n}\nvoid some_rcu_callback() {\n  tcf_queue_work(some_work);\n}\n\nif (tcf_exts_get_net())  // \u003c\u003d\u003d hold netns refcnt\n  call_rcu(some_rcu_callback);\nelse\n  __destroy_filter();\n\nCc: Lucas Bates \u003clucasb@mojatatu.com\u003e\nCc: Jamal Hadi Salim \u003cjhs@mojatatu.com\u003e\nCc: Jiri Pirko \u003cjiri@resnulli.us\u003e\nSigned-off-by: Cong Wang \u003cxiyou.wangcong@gmail.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "70ca2437740e41284d7b40b5c202d85fc2e6668b",
      "old_mode": 33188,
      "old_path": "include/net/pkt_cls.h",
      "new_id": "8826747ef83e616156092f311282c4785621d923",
      "new_mode": 33188,
      "new_path": "include/net/pkt_cls.h"
    },
    {
      "type": "modify",
      "old_id": "b2d31074548724a3b59defbcd827d6538ac9bea6",
      "old_mode": 33188,
      "old_path": "net/sched/cls_api.c",
      "new_id": "ecbb019efcbd310dd1caaaf336d2db2b523713dd",
      "new_mode": 33188,
      "new_path": "net/sched/cls_api.c"
    }
  ]
}
