)]}'
{
  "commit": "42a06f2166f2f6f7bf04f32b4e823eacdceafdc9",
  "tree": "c5e08605fe4578bf1c35fab20eed520f505d767d",
  "parents": [
    "d38e73e8dad454a5916f446b0d3523c1161ae95a"
  ],
  "author": {
    "name": "Mathieu Desnoyers",
    "email": "mathieu.desnoyers@polymtl.ca",
    "time": "Sun May 17 10:23:52 2009 -0400"
  },
  "committer": {
    "name": "Dave Jones",
    "email": "davej@redhat.com",
    "time": "Tue May 26 12:04:50 2009 -0400"
  },
  "message": "[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call\n\n* Rafael J. Wysocki (rjw@sisk.pl) wrote:\n\u003e This message has been generated automatically as a part of a report\n\u003e of regressions introduced between 2.6.28 and 2.6.29.\n\u003e\n\u003e The following bug entry is on the current list of known regressions\n\u003e introduced between 2.6.28 and 2.6.29.  Please verify if it still should\n\u003e be listed and let me know (either way).\n\u003e\n\u003e\n\u003e Bug-Entry\t: http://bugzilla.kernel.org/show_bug.cgi?id\u003d13186\n\u003e Subject\t\t: cpufreq timer teardown problem\n\u003e Submitter\t: Mathieu Desnoyers \u003cmathieu.desnoyers@polymtl.ca\u003e\n\u003e Date\t\t: 2009-04-23 14:00 (24 days old)\n\u003e References\t: http://marc.info/?l\u003dlinux-kernel\u0026m\u003d124049523515036\u0026w\u003d4\n\u003e Handled-By\t: Mathieu Desnoyers \u003cmathieu.desnoyers@polymtl.ca\u003e\n\u003e Patch\t\t: http://patchwork.kernel.org/patch/19754/\n\u003e \t\t  http://patchwork.kernel.org/patch/19753/\n\nThe patches linked above depend on the following patch to remove\ncircular locking dependency :\n\ncpufreq: remove rwsem lock from CPUFREQ_GOV_STOP call\n\n(the following issue was faced when using cancel_delayed_work_sync() in the\ntimer teardown (which fixes a race).\n\n* KOSAKI Motohiro (kosaki.motohiro@jp.fujitsu.com) wrote:\n\u003e Hi\n\u003e\n\u003e my box output following warnings.\n\u003e it seems regression by commit 7ccc7608b836e58fbacf65ee4f8eefa288e86fac.\n\u003e\n\u003e A: work -\u003e do_dbs_timer()  -\u003e cpu_policy_rwsem\n\u003e B: store() -\u003e cpu_policy_rwsem -\u003e cpufreq_governor_dbs() -\u003e work\n\u003e\n\u003e\n\nHrm, I think it must be due to my attempt to fix the timer teardown race\nin ondemand governor mixed with new locking behavior in 2.6.30-rc.\n\nThe rwlock seems to be taken around the whole call to\ncpufreq_governor_dbs(), when it should be only taken around accesses to\nthe locked data, and especially *not* around the call to\ndbs_timer_exit().\n\nReverting my fix attempt would put the teardown race back in place\n(replacing the cancel_delayed_work_sync by cancel_delayed_work).\nInstead, a proper fix would imply modifying this critical section :\n\ncpufreq.c: __cpufreq_remove_dev()\n...\n        if (cpufreq_driver-\u003etarget)\n                __cpufreq_governor(data, CPUFREQ_GOV_STOP);\n\n        unlock_policy_rwsem_write(cpu);\n\nTo make sure the __cpufreq_governor() callback is not called with rwsem\nheld. This would allow execution of cancel_delayed_work_sync() without\nbeing nested within the rwsem.\n\nApplies on top of the 2.6.30-rc5 tree.\n\nRequired to remove circular dep in teardown of both conservative and\nondemande governors so they can use cancel_delayed_work_sync().\nCPUFREQ_GOV_STOP does not modify the policy, therefore this locking seemed\nunneeded.\n\nSigned-off-by: Mathieu Desnoyers \u003cmathieu.desnoyers@polymtl.ca\u003e\nCC: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Greg KH \u003cgreg@kroah.com\u003e\nCC: Ingo Molnar \u003cmingo@elte.hu\u003e\nCC: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\nCC: Ben Slusky \u003csluskyb@paranoiacs.org\u003e\nCC: Chris Wright \u003cchrisw@sous-sol.org\u003e\nCC: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Dave Jones \u003cdavej@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d270e8eb3e67f3fb0af2af1b6d4ea7a36521cf07",
      "old_mode": 33188,
      "old_path": "drivers/cpufreq/cpufreq.c",
      "new_id": "47d2ad0ae079c738fa8aa90656595026a56d7a8a",
      "new_mode": 33188,
      "new_path": "drivers/cpufreq/cpufreq.c"
    }
  ]
}
