)]}'
{
  "commit": "73ddff2bee159ffb580bd24faf625cd5e628f5ec",
  "tree": "218cf5101b67c98ef99814e59706976d3ad245c2",
  "parents": [
    "dd1d6772692316fe35094085c5e4d9a370ad3462"
  ],
  "author": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Tue Jun 14 11:20:14 2011 +0200"
  },
  "committer": {
    "name": "Oleg Nesterov",
    "email": "oleg@redhat.com",
    "time": "Thu Jun 16 21:41:52 2011 +0200"
  },
  "message": "job control: introduce JOBCTL_TRAP_STOP and use it for group stop trap\n\ndo_signal_stop() implemented both normal group stop and trap for group\nstop while ptraced.  This approach has been enough but scheduled\nchanges require trap mechanism which can be used in more generic\nmanner and using group stop trap for generic trap site simplifies both\nuserland visible interface and implementation.\n\nThis patch adds a new jobctl flag - JOBCTL_TRAP_STOP.  When set, it\ntriggers a trap site, which behaves like group stop trap, in\nget_signal_to_deliver() after checking for pending signals.  While\nptraced, do_signal_stop() doesn\u0027t stop itself.  It initiates group\nstop if requested and schedules JOBCTL_TRAP_STOP and returns.  The\ncaller - get_signal_to_deliver() - is responsible for checking whether\nTRAP_STOP is pending afterwards and handling it.\n\nptrace_attach() is updated to use JOBCTL_TRAP_STOP instead of\nJOBCTL_STOP_PENDING and __ptrace_unlink() to clear all pending trap\nbits and TRAPPING so that TRAP_STOP and future trap bits don\u0027t linger\nafter detach.\n\nWhile at it, add proper function comment to do_signal_stop() and make\nit return bool.\n\n-v2: __ptrace_unlink() updated to clear JOBCTL_TRAP_MASK and TRAPPING\n     instead of JOBCTL_PENDING_MASK.  This avoids accidentally\n     clearing JOBCTL_STOP_CONSUME.  Spotted by Oleg.\n\n-v3: do_signal_stop() updated to return %false without dropping\n     siglock while ptraced and TRAP_STOP check moved inside for(;;)\n     loop after group stop participation.  This avoids unnecessary\n     relocking and also will help avoiding unnecessary traps by\n     consuming group stop before handling pending traps.\n\n-v4: Jobctl trap handling moved into a separate function -\n     do_jobctl_trap().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5157bd9eee37f79d19a67daa3cb3ff99ef600f59",
      "old_mode": 33188,
      "old_path": "include/linux/sched.h",
      "new_id": "8bd84b83a35b34c87a66100b8087fd0d40a1af10",
      "new_mode": 33188,
      "new_path": "include/linux/sched.h"
    },
    {
      "type": "modify",
      "old_id": "7f05f3a1267b8b7753f26b03b12ead7b262fad4d",
      "old_mode": 33188,
      "old_path": "kernel/ptrace.c",
      "new_id": "45a8a4c5d8b24772578db2b60e67eae291f426ba",
      "new_mode": 33188,
      "new_path": "kernel/ptrace.c"
    },
    {
      "type": "modify",
      "old_id": "c99b8b5c0be7a4fe682b8f7b0ddddc91e6fda0e6",
      "old_mode": 33188,
      "old_path": "kernel/signal.c",
      "new_id": "b5f55ca1f43f8994d86b58d988dd28d158a64d29",
      "new_mode": 33188,
      "new_path": "kernel/signal.c"
    }
  ]
}
