)]}'
{
  "commit": "78f11a255749d09025f54d4e2df4fbcb031530e2",
  "tree": "20f8ffaf8548d963ffb519631f5c7d7372e9ca42",
  "parents": [
    "6d4831c283530a5f2c6bd8172c13efa236eb149d"
  ],
  "author": {
    "name": "Andrea Arcangeli",
    "email": "aarcange@redhat.com",
    "time": "Wed Apr 27 15:26:45 2011 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Thu Apr 28 11:28:20 2011 -0700"
  },
  "message": "mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups\n\nThe huge_memory.c THP page fault was allowed to run if vm_ops was null\n(which would succeed for /dev/zero MAP_PRIVATE, as the f_op-\u003emmap wouldn\u0027t\nsetup a special vma-\u003evm_ops and it would fallback to regular anonymous\nmemory) but other THP logics weren\u0027t fully activated for vmas with vm_file\nnot NULL (/dev/zero has a not NULL vma-\u003evm_file).\n\nSo this removes the vm_file checks so that /dev/zero also can safely use\nTHP (the other albeit safer approach to fix this bug would have been to\nprevent the THP initial page fault to run if vm_file was set).\n\nAfter removing the vm_file checks, this also makes huge_memory.c stricter\nin khugepaged for the DEBUG_VM\u003dy case.  It doesn\u0027t replace the vm_file\ncheck with a is_pfn_mapping check (but it keeps checking for VM_PFNMAP\nunder VM_BUG_ON) because for a is_cow_mapping() mapping VM_PFNMAP should\nonly be allowed to exist before the first page fault, and in turn when\nvma-\u003eanon_vma is null (so preventing khugepaged registration).  So I tend\nto think the previous comment saying if vm_file was set, VM_PFNMAP might\nhave been set and we could still be registered in khugepaged (despite\nanon_vma was not NULL to be registered in khugepaged) was too paranoid.\nThe is_linear_pfn_mapping check is also I think superfluous (as described\nby comment) but under DEBUG_VM it is safe to stay.\n\nAddresses https://bugzilla.kernel.org/show_bug.cgi?id\u003d33682\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReported-by: Caspar Zhang \u003cbugs@casparzhang.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: \u003cstable@kernel.org\u003e\t\t[2.6.38.x]\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": "df29c8fde36be8b7b9e0e13771d8ad4bb1fd6444",
      "old_mode": 33188,
      "old_path": "include/linux/huge_mm.h",
      "new_id": "8847c8c29791c8c078dedaf0db9ff6dce85faa23",
      "new_mode": 33188,
      "new_path": "include/linux/huge_mm.h"
    },
    {
      "type": "modify",
      "old_id": "692dbae6ffa76997058792ad3441f551bf303473",
      "old_mode": 33188,
      "old_path": "include/linux/mm.h",
      "new_id": "2348db26bc3d969d58b18253b975ef8042d8d278",
      "new_mode": 33188,
      "new_path": "include/linux/mm.h"
    },
    {
      "type": "modify",
      "old_id": "470dcda10addbc68e1470c9bc8c92b5dba103623",
      "old_mode": 33188,
      "old_path": "mm/huge_memory.c",
      "new_id": "83326ad66d9b15df1027a0274d92886c85386394",
      "new_mode": 33188,
      "new_path": "mm/huge_memory.c"
    }
  ]
}
