)]}'
{
  "commit": "a8bef8ff6ea15fa4c67433cab0f5f3484574ef7c",
  "tree": "3ea9c122e02f523379d4560ee2134124d097895c",
  "parents": [
    "e9e96b39f932a065e14f5d5bab0797ae261d03b5"
  ],
  "author": {
    "name": "Mel Gorman",
    "email": "mel@csn.ul.ie",
    "time": "Mon May 24 14:32:24 2010 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue May 25 08:06:59 2010 -0700"
  },
  "message": "mm: migration: avoid race between shift_arg_pages() and rmap_walk() during migration by not migrating temporary stacks\n\nPage migration requires rmap to be able to find all ptes mapping a page\nat all times, otherwise the migration entry can be instantiated, but it\nis possible to leave one behind if the second rmap_walk fails to find\nthe page.  If this page is later faulted, migration_entry_to_page() will\ncall BUG because the page is locked indicating the page was migrated by\nthe migration PTE not cleaned up. For example\n\n  kernel BUG at include/linux/swapops.h:105!\n  invalid opcode: 0000 [#1] PREEMPT SMP\n  ...\n  Call Trace:\n   [\u003cffffffff810e951a\u003e] handle_mm_fault+0x3f8/0x76a\n   [\u003cffffffff8130c7a2\u003e] do_page_fault+0x44a/0x46e\n   [\u003cffffffff813099b5\u003e] page_fault+0x25/0x30\n   [\u003cffffffff8114de33\u003e] load_elf_binary+0x152a/0x192b\n   [\u003cffffffff8111329b\u003e] search_binary_handler+0x173/0x313\n   [\u003cffffffff81114896\u003e] do_execve+0x219/0x30a\n   [\u003cffffffff8100a5c6\u003e] sys_execve+0x43/0x5e\n   [\u003cffffffff8100320a\u003e] stub_execve+0x6a/0xc0\n  RIP  [\u003cffffffff811094ff\u003e] migration_entry_wait+0xc1/0x129\n\nThere is a race between shift_arg_pages and migration that triggers this\nbug.  A temporary stack is setup during exec and later moved.  If\nmigration moves a page in the temporary stack and the VMA is then removed\nbefore migration completes, the migration PTE may not be found leading to\na BUG when the stack is faulted.\n\nThis patch causes pages within the temporary stack during exec to be\nskipped by migration.  It does this by marking the VMA covering the\ntemporary stack with an otherwise impossible combination of VMA flags.\nThese flags are cleared when the temporary stack is moved to its final\nlocation.\n\n[kamezawa.hiroyu@jp.fujitsu.com: idea for having migration skip temporary stacks]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.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": "e6e94c626c2cbebb7699597271a953b65e611e6e",
      "old_mode": 33188,
      "old_path": "fs/exec.c",
      "new_id": "9badbc0bfb1d23afd6cf64ace5ad1f1ae757d294",
      "new_mode": 33188,
      "new_path": "fs/exec.c"
    },
    {
      "type": "modify",
      "old_id": "fb19bb92b809d81564cf03af26f5a568f2994629",
      "old_mode": 33188,
      "old_path": "include/linux/mm.h",
      "new_id": "98ea5bab963e60b81901b1240558d701bf84ac31",
      "new_mode": 33188,
      "new_path": "include/linux/mm.h"
    },
    {
      "type": "modify",
      "old_id": "b5c320f7d0a5ba84db7c0c007dade54a686d0942",
      "old_mode": 33188,
      "old_path": "mm/rmap.c",
      "new_id": "38a336e2eea1e104a654052834ef93e252340d18",
      "new_mode": 33188,
      "new_path": "mm/rmap.c"
    }
  ]
}
