)]}'
{
  "commit": "bc56bba8f31bd99f350a5ebfd43d50f411b620c7",
  "tree": "68213ce8da2f7af8e3f39b77c078d6162776a95c",
  "parents": [
    "8ef8286689c6b5bc76212437b85bdd2ba749ee44"
  ],
  "author": {
    "name": "Eric W. Biederman",
    "email": "ebiederm@xmission.com",
    "time": "Tue Feb 20 13:57:53 2007 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@woody.linux-foundation.org",
    "time": "Tue Feb 20 17:10:13 2007 -0800"
  },
  "message": "[PATCH] shm: make sysv ipc shared memory use stacked files\n\nThe current ipc shared memory code runs into several problems because it\ndoes not quite use files like the rest of the kernel.  With the option of\nbacking ipc shared memory with either hugetlbfs or ordinary shared memory\nthe problems got worse.  With the added support for ipc namespaces things\nbehaved so unexpected that we now have several bad namespace reference\ncounting bugs when using what appears at first glance to be a reasonable\nidiom.\n\nSo to attack these problems and hopefully make the code more maintainable\nthis patch simply uses the files provided by other parts of the kernel and\nbuilds it\u0027s own files out of them.  The shm files are allocated in do_shmat\nand freed when their reference count drops to zero with their last unmap.\nThe file and vm operations that we don\u0027t want to implement or we don\u0027t\nimplement completely we just delegate to the operations of our backing\nfile.\n\nThis means that we now get an accurate shm_nattch count for we have a\nhugetlbfs inode for backing store, and the shm accounting of last attach\nand last detach time work as well.\n\nThis means that getting a reference to the ipc namespace when we create the\nfile and dropping the referenece in the release method is now safe and\ncorrect.\n\nThis means we no longer need a special case for clearing VM_MAYWRITE\nas our file descriptor now only has write permissions when we have\nrequested write access when calling shmat.  Although VM_SHARED is now\ncleared as well which I believe is harmless and is mostly likely a\nminor bug fix.\n\nBy using the same set of operations for both the hugetlb case and regular\nshared memory case shmdt is not simplified and made slightly more correct\nas now the test \"vma-\u003evm_ops \u003d\u003d \u0026shm_vm_ops\" is 100% accurate in spotting\nall shared memory regions generated from sysvipc shared memory.\n\nSigned-off-by: Eric W. Biederman \u003cebiederm@xmission.com\u003e\nCc: Michal Piotrowski \u003cmichal.k.k.piotrowski@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": "5bb617f6306e8df814398505393b15e2b0c3c0ee",
      "old_mode": 33188,
      "old_path": "ipc/shm.c",
      "new_id": "eb57e22543049f2bb157505458fc90308a797543",
      "new_mode": 33188,
      "new_path": "ipc/shm.c"
    }
  ]
}
