)]}'
{
  "commit": "e2652ae6bd7492cdc0436817cbcd09282eb0bb03",
  "tree": "3736e02fc0a194548e10bf40680b22d737f6b320",
  "parents": [
    "615c999cd8a07b7c3c93bbdee89ef705d2ce52e1"
  ],
  "author": {
    "name": "Manfred Spraul",
    "email": "manfred@colorfullife.com",
    "time": "Tue Aug 21 22:01:25 2018 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Wed Aug 22 10:52:51 2018 -0700"
  },
  "message": "ipc: reorganize initialization of kern_ipc_perm.seq\n\nipc_addid() initializes kern_ipc_perm.seq after having called idr_alloc()\n(within ipc_idr_alloc()).\n\nThus a parallel semop() or msgrcv() that uses ipc_obtain_object_check()\nmay see an uninitialized value.\n\nThe patch moves the initialization of kern_ipc_perm.seq before the calls\nof idr_alloc().\n\nNotes:\n1) This patch has a user space visible side effect:\nIf /proc/sys/kernel/*_next_id is used (i.e.: checkpoint/restore) and\nif semget()/msgget()/shmget() fails in the final step of adding the id\nto the rhash tree, then .._next_id is cleared. Before the patch, is\nremained unmodified.\n\nThere is no change of the behavior after a successful ..get() call: It\nalways clears .._next_id, there is no impact to non checkpoint/restore\ncode as that code does not use .._next_id.\n\n2) The patch correctly documents that after a call to ipc_idr_alloc(),\nthe full tear-down sequence must be used. The callers of ipc_addid()\ndo not fullfill that, i.e. more bugfixes are required.\n\nThe patch is a squash of a patch from Dmitry and my own changes.\n\nLink: http://lkml.kernel.org/r/20180712185241.4017-3-manfred@colorfullife.com\nReported-by: syzbot+2827ef6b3385deb07eaf@syzkaller.appspotmail.com\nSigned-off-by: Manfred Spraul \u003cmanfred@colorfullife.com\u003e\nCc: Dmitry Vyukov \u003cdvyukov@google.com\u003e\nCc: Kees Cook \u003ckeescook@chromium.org\u003e\nCc: Davidlohr Bueso \u003cdave@stgolabs.net\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@gmail.com\u003e\nCc: Davidlohr Bueso \u003cdbueso@suse.de\u003e\nCc: Herbert Xu \u003cherbert@gondor.apana.org.au\u003e\nCc: Michal Hocko \u003cmhocko@suse.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": "9d38e75b19a0790f94e724ed228d19d36dba856d",
      "old_mode": 33188,
      "old_path": "Documentation/sysctl/kernel.txt",
      "new_id": "37a679501ddc68bc0ab26c58444794c0d30c8f40",
      "new_mode": 33188,
      "new_path": "Documentation/sysctl/kernel.txt"
    },
    {
      "type": "modify",
      "old_id": "fdffff41f65b546f66a5ee9b69297b39c445b8a0",
      "old_mode": 33188,
      "old_path": "ipc/util.c",
      "new_id": "e5c9e2b2e4c471edd878e29290314bbea2c723d9",
      "new_mode": 33188,
      "new_path": "ipc/util.c"
    }
  ]
}
