)]}'
{
  "commit": "ec433f0c51527426989ea8a38a856d810d739414",
  "tree": "001550d7b18b3f2b5326da3f9dfd893e31c8dc1c",
  "parents": [
    "c5d753a55ac92e09816d410cd17093813f1a904b"
  ],
  "author": {
    "name": "Peter Zijlstra",
    "email": "a.p.zijlstra@chello.nl",
    "time": "Tue Jul 19 15:32:00 2011 -0700"
  },
  "committer": {
    "name": "Paul E. McKenney",
    "email": "paulmck@linux.vnet.ibm.com",
    "time": "Wed Jul 20 10:50:12 2011 -0700"
  },
  "message": "softirq,rcu: Inform RCU of irq_exit() activity\n\nThe rcu_read_unlock_special() function relies on in_irq() to exclude\nscheduler activity from interrupt level.  This fails because exit_irq()\ncan invoke the scheduler after clearing the preempt_count() bits that\nin_irq() uses to determine that it is at interrupt level.  This situation\ncan result in failures as follows:\n\n $task\t\t\tIRQ\t\tSoftIRQ\n\n rcu_read_lock()\n\n /* do stuff */\n\n \u003cpreempt\u003e |\u003d UNLOCK_BLOCKED\n\n rcu_read_unlock()\n   --t-\u003ercu_read_lock_nesting\n\n\t\t\tirq_enter();\n\t\t\t/* do stuff, don\u0027t use RCU */\n\t\t\tirq_exit();\n\t\t\t  sub_preempt_count(IRQ_EXIT_OFFSET);\n\t\t\t  invoke_softirq()\n\n\t\t\t\t\tttwu();\n\t\t\t\t\t  spin_lock_irq(\u0026pi-\u003elock)\n\t\t\t\t\t  rcu_read_lock();\n\t\t\t\t\t  /* do stuff */\n\t\t\t\t\t  rcu_read_unlock();\n\t\t\t\t\t    rcu_read_unlock_special()\n\t\t\t\t\t      rcu_report_exp_rnp()\n\t\t\t\t\t        ttwu()\n\t\t\t\t\t          spin_lock_irq(\u0026pi-\u003elock) /* deadlock */\n\n   rcu_read_unlock_special(t);\n\nEd can simply trigger this \u0027easy\u0027 because invoke_softirq() immediately\ndoes a ttwu() of ksoftirqd/# instead of doing the in-place softirq stuff\nfirst, but even without that the above happens.\n\nCure this by also excluding softirqs from the\nrcu_read_unlock_special() handler and ensuring the force_irqthreads\nksoftirqd/# wakeup is done from full softirq context.\n\n[ Alternatively, delaying the -\u003ercu_read_lock_nesting decrement\n  until after the special handling would make the thing more robust\n  in the face of interrupts as well.  And there is a separate patch\n  for that. ]\n\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nReported-and-tested-by: Ed Tomlinson \u003cedt@aei.ca\u003e\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nSigned-off-by: Paul E. McKenney \u003cpaulmck@linux.vnet.ibm.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d9d7a89da8bb1d0503f8d10853ee16678f9bfa5f",
      "old_mode": 33188,
      "old_path": "kernel/rcutree_plugin.h",
      "new_id": "8aafbb80b8b093e1072f2fcc4dc66bf40f249b7f",
      "new_mode": 33188,
      "new_path": "kernel/rcutree_plugin.h"
    },
    {
      "type": "modify",
      "old_id": "40cf63ddd4b3d740d2620ddbf1fa245830b1d703",
      "old_mode": 33188,
      "old_path": "kernel/softirq.c",
      "new_id": "fca82c32042b73133f2ab74838287c94cf8ad152",
      "new_mode": 33188,
      "new_path": "kernel/softirq.c"
    }
  ]
}
