)]}'
{
  "commit": "31a67102f4762df5544bc2dfb34a931233d2a5b2",
  "tree": "5ab348c520d60e331fb9e469cd592ee411f3850f",
  "parents": [
    "e47b65b032f2997aa0a7392ecdf656c86d4d7561"
  ],
  "author": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon May 21 12:52:42 2012 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon May 21 12:52:42 2012 -0700"
  },
  "message": "Fix blocking allocations called very early during bootup\n\nDuring early boot, when the scheduler hasn\u0027t really been fully set up,\nwe really can\u0027t do blocking allocations because with certain (dubious)\nconfigurations the \"might_resched()\" calls can actually result in\nscheduling events.\n\nWe could just make such users always use GFP_ATOMIC, but quite often the\ncode that does the allocation isn\u0027t really aware of the fact that the\nscheduler isn\u0027t up yet, and forcing that kind of random knowledge on the\ninitialization code is just annoying and not good for anybody.\n\nAnd we actually have a the \u0027gfp_allowed_mask\u0027 exactly for this reason:\nit\u0027s just that the kernel init sequence happens to set it to allow\nblocking allocations much too early.\n\nSo move the \u0027gfp_allowed_mask\u0027 initialization from \u0027start_kernel()\u0027\n(which is some of the earliest init code, and runs with preemption\ndisabled for good reasons) into \u0027kernel_init()\u0027.  kernel_init() is run\nin the newly created thread that will become the \u0027init\u0027 process, as\nopposed to the early startup code that runs within the context of what\nwill be the first idle thread.\n\nSo by the time we reach \u0027kernel_init()\u0027, we know that the scheduler must\nbe at least limping along, because we\u0027ve already scheduled from the idle\nthread into the init thread.\n\nReported-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: stable@vger.kernel.org\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "44b2433334c749ed92d7e42e5938f840efd843c0",
      "old_mode": 33188,
      "old_path": "init/main.c",
      "new_id": "cb54cd3dbf05a6eb5621d53d171476ef1fde6f66",
      "new_mode": 33188,
      "new_path": "init/main.c"
    }
  ]
}
