)]}'
{
  "commit": "610a77e04a8d9fe8764dc484e2182fa251ce1cc2",
  "tree": "ec55b9b3698321c3e85cd649fa927554027c75d0",
  "parents": [
    "e2f17d9459aeccf4e013e31cbd741d6b1858eec4"
  ],
  "author": {
    "name": "Li Zefan",
    "email": "lizf@cn.fujitsu.com",
    "time": "Tue Mar 31 15:23:16 2009 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Wed Apr 01 08:59:13 2009 -0700"
  },
  "message": "memdup_user(): introduce\n\nI notice there are many places doing copy_from_user() which follows\nkmalloc():\n\n        dst \u003d kmalloc(len, GFP_KERNEL);\n        if (!dst)\n                return -ENOMEM;\n        if (copy_from_user(dst, src, len)) {\n\t\tkfree(dst);\n\t\treturn -EFAULT\n\t}\n\nmemdup_user() is a wrapper of the above code.  With this new function, we\ndon\u0027t have to write \u0027len\u0027 twice, which can lead to typos/mistakes.  It\nalso produces smaller code and kernel text.\n\nA quick grep shows 250+ places where memdup_user() *may* be used.  I\u0027ll\nprepare a patchset to do this conversion.\n\nSigned-off-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Americo Wang \u003cxiyou.wangcong@gmail.com\u003e\nCc: Alexey Dobriyan \u003cadobriyan@gmail.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": "d18fc198aa2fd3c337e821e78eedc97e5ea8459b",
      "old_mode": 33188,
      "old_path": "include/linux/string.h",
      "new_id": "8852739f36dfe94529ad3bdb09555741b0829b9e",
      "new_mode": 33188,
      "new_path": "include/linux/string.h"
    },
    {
      "type": "modify",
      "old_id": "37eaccdf3054e13d60cd83cf5c6cb9869731aec1",
      "old_mode": 33188,
      "old_path": "mm/util.c",
      "new_id": "7c122e49f769ccea98ae105746e0238acc1652ce",
      "new_mode": 33188,
      "new_path": "mm/util.c"
    }
  ]
}
