)]}'
{
  "commit": "f4e53d910b7dde2685b177f1e7c3e3e0b4a42f7b",
  "tree": "db4db3abbc0b63de88dabd13e9359ca86973935c",
  "parents": [
    "846a16bf0fc80dc95a414ffce465e3cbf9680247"
  ],
  "author": {
    "name": "Lee Schermerhorn",
    "email": "lee.schermerhorn@hp.com",
    "time": "Mon Apr 28 02:13:10 2008 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon Apr 28 08:58:23 2008 -0700"
  },
  "message": "mempolicy: write lock mmap_sem while changing task mempolicy\n\nA read of /proc/\u003cpid\u003e/numa_maps holds the target task\u0027s mmap_sem for read\nwhile examining each vma\u0027s mempolicy.  A vma\u0027s mempolicy can fall back to the\ntask\u0027s policy.  However, the task could be changing it\u0027s task policy and free\nthe one that the show_numa_maps() is examining.\n\nTo prevent this, grab the mmap_sem for write when updating task mempolicy.\nPointed out to me by Christoph Lameter and extracted and reworked from\nChristoph\u0027s alternative mempol reference counting patch.\n\nThis is analogous to the way that do_mbind() and do_get_mempolicy() prevent\nraces between task\u0027s sharing an mm_struct [a.k.a.  threads] setting and\nquerying a mempolicy for a particular address.\n\nNote: this is necessary, but not sufficient, to allow us to stop taking an\nextra reference on \"other task\u0027s mempolicy\" in get_vma_policy.  Subsequent\npatches will complete this update, allowing us to simplify the tests for\nwhether we need to unref a mempolicy at various points in the code.\n\nSigned-off-by: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nCc: Christoph Lameter \u003cclameter@sgi.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andi Kleen \u003cak@suse.de\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": "e9fc1c1ae66c6a328700720d1151118188b9aa79",
      "old_mode": 33188,
      "old_path": "mm/mempolicy.c",
      "new_id": "c6c61ea6bb8ca827ea308dcf71ca51d398337a0f",
      "new_mode": 33188,
      "new_path": "mm/mempolicy.c"
    }
  ]
}
