)]}'
{
  "commit": "c7a3a88c938fbe3d70c2278e082b80eb830d1c58",
  "tree": "e25070dc5141c2614fbcfaae543de4237418a623",
  "parents": [
    "9160338de92c0305329be5163a76f849806e83de"
  ],
  "author": {
    "name": "Oleg Nesterov",
    "email": "oleg@redhat.com",
    "time": "Sun Aug 19 19:10:42 2012 +0200"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@kernel.org",
    "time": "Tue Aug 21 11:48:12 2012 +0200"
  },
  "message": "uprobes: Fix mmap_region()\u0027s mm-\u003emm_rb corruption if uprobe_mmap() fails\n\nThis patch fixes:\n\n  https://bugzilla.redhat.com/show_bug.cgi?id\u003d843640\n\nIf mmap_region()-\u003euprobe_mmap() fails, unmap_and_free_vma path\ndoes unmap_region() but does not remove the soon-to-be-freed vma\nfrom rb tree. Actually there are more problems but this is how\nWilliam noticed this bug.\n\nPerhaps we could do do_munmap() + return in this case, but in\nfact it is simply wrong to abort if uprobe_mmap() fails. Until\nat least we move the !UPROBE_COPY_INSN code from\ninstall_breakpoint() to uprobe_register().\n\nFor example, uprobe_mmap()-\u003einstall_breakpoint() can fail if the\nprobed insn is not supported (remember, uprobe_register()\nsucceeds if nobody mmaps inode/offset), mmap() should not fail\nin this case.\n\ndup_mmap()-\u003euprobe_mmap() is wrong too by the same reason,\nfork() can race with uprobe_register() and fail for no reason if\nit wins the race and does install_breakpoint() first.\n\nAnd, if nothing else, both mmap_region() and dup_mmap() return\nsuccess if uprobe_mmap() fails. Change them to ignore the error\ncode from uprobe_mmap().\n\nReported-and-tested-by: William Cohen \u003cwcohen@redhat.com\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: Srikar Dronamraju \u003csrikar@linux.vnet.ibm.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e # v3.5\nCc: Anton Arapov \u003canton@redhat.com\u003e\nCc: William Cohen \u003cwcohen@redhat.com\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nLink: http://lkml.kernel.org/r/20120819171042.GB26957@redhat.com\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3bd2280d79f6b5507537c3e294e05c77a69d678f",
      "old_mode": 33188,
      "old_path": "kernel/fork.c",
      "new_id": "2c8857e12855393759562b3c6eeec2d23de6f080",
      "new_mode": 33188,
      "new_path": "kernel/fork.c"
    },
    {
      "type": "modify",
      "old_id": "e3e86914f11ad7d664ec73e08c98ee5670ef8e16",
      "old_mode": 33188,
      "old_path": "mm/mmap.c",
      "new_id": "52e08fc9186d08250fa6bd7b0ac8377c49d2076b",
      "new_mode": 33188,
      "new_path": "mm/mmap.c"
    }
  ]
}
