)]}'
{
  "commit": "f1dad166e88a5ddca0acf8f11dea0e2bd92d8bf3",
  "tree": "e907d1de7ee3bad49b101336a0b1640e8d05bd51",
  "parents": [
    "092e1fdaf35126475aef0dc70f4a2ce4f2f43052"
  ],
  "author": {
    "name": "Pavel Emelyanov",
    "email": "xemul@openvz.org",
    "time": "Tue Dec 04 23:45:24 2007 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@woody.linux-foundation.org",
    "time": "Wed Dec 05 09:21:20 2007 -0800"
  },
  "message": "Avoid potential NULL dereference in unregister_sysctl_table\n\nregister_sysctl_table() can return NULL sometimes, e.g.  when kmalloc()\nreturns NULL or when sysctl check fails.\n\nI\u0027ve also noticed, that many (most?) code in the kernel doesn\u0027t check for\nthe return value from register_sysctl_table() and later simply calls the\nunregister_sysctl_table() with potentially NULL argument.\n\nThis is unlikely on a common kernel configuration, but in case we\u0027re\ndealing with modules and/or fault-injection support, there\u0027s a slight\npossibility of an OOPS.\n\nChanging all the users to check for return code from the registering does\nnot look like a good solution - there are too many code doing this and\nfailure in sysctl tables registration is not a good reason to abort module\nloading (in most of the cases).\n\nSo I think, that we can just have this check in unregister_sysctl_table\njust to avoid accidental OOPS-es (actually, the unregister_sysctl_table()\ndid exactly this, before the start_unregistering() appeared).\n\nSigned-off-by: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0deed82a61568d6660a7f4ee625c490ffecffcc5",
      "old_mode": 33188,
      "old_path": "kernel/sysctl.c",
      "new_id": "8ac51714b08ca7ec4261b8544fc62524dad8a3e4",
      "new_mode": 33188,
      "new_path": "kernel/sysctl.c"
    }
  ]
}
