)]}'
{
  "commit": "6af8bef14d6fc9e4e52c83fd646412e9dedadd26",
  "tree": "a1ddb0962fe8d5704cff9f3627322eb2fe0fa479",
  "parents": [
    "379021d5c0899fcf9410cae4ca7a59a5a94ca769"
  ],
  "author": {
    "name": "Prarit Bhargava",
    "email": "prarit@redhat.com",
    "time": "Wed Sep 28 19:40:53 2011 -0400"
  },
  "committer": {
    "name": "Jesse Barnes",
    "email": "jbarnes@virtuousgeek.org",
    "time": "Fri Oct 14 09:05:31 2011 -0700"
  },
  "message": "PCI hotplug: acpiphp: Prevent deadlock on PCI-to-PCI bridge remove\n\nI originally submitted a patch to workaround this by pushing all Ejection\nRequests and Device Checks onto the kacpi_hotplug queue.\n\nhttp://marc.info/?l\u003dlinux-acpi\u0026m\u003d131678270930105\u0026w\u003d2\n\nThe patch is still insufficient in that Bus Checks also need to be added.\n\nRather than add all events, including non-PCI-hotplug events, to the\nhotplug queue, mjg suggested that a better approach would be to modify\nthe acpiphp driver so only acpiphp events would be added to the\nkacpi_hotplug queue.\n\nIt\u0027s a longer patch, but at least we maintain the benefit of having separate\nqueues in ACPI.  This, of course, is still only a workaround the problem.\nAs Bjorn and mjg pointed out, we have to refactor a lot of this code to do\nthe right thing but at this point it is a better to have this code working.\n\nThe acpi core places all events on the kacpi_notify queue.  When the acpiphp\ndriver is loaded and a PCI card with a PCI-to-PCI bridge is removed the\nfollowing call sequence occurs:\n\ncleanup_p2p_bridge()\n\t    -\u003e cleanup_bridge()\n\t\t    -\u003e acpi_remove_notify_handler()\n\t\t\t    -\u003e acpi_os_wait_events_complete()\n\t\t\t\t    -\u003e flush_workqueue(kacpi_notify_wq)\n\nwhich is the queue we are currently executing on and the process will hang.\n\nMove all hotplug acpiphp events onto the kacpi_hotplug workqueue.  In\nhandle_hotplug_event_bridge() and handle_hotplug_event_func() we can simply\npush the rest of the work onto the kacpi_hotplug queue and then avoid the\ndeadlock.\n\nSigned-off-by: Prarit Bhargava \u003cprarit@redhat.com\u003e\nCc: mjg@redhat.com\nCc: bhelgaas@google.com\nCc: linux-acpi@vger.kernel.org\nSigned-off-by: Jesse Barnes \u003cjbarnes@virtuousgeek.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fa32f584229f47f8965d56f6e4d61054796d8d39",
      "old_mode": 33188,
      "old_path": "drivers/acpi/osl.c",
      "new_id": "f31c5c5f1b7e083351e013649f1e1d73fdd74fa6",
      "new_mode": 33188,
      "new_path": "drivers/acpi/osl.c"
    },
    {
      "type": "modify",
      "old_id": "220285760b68691f2d3d16ec79822de2383a50be",
      "old_mode": 33188,
      "old_path": "drivers/pci/hotplug/acpiphp_glue.c",
      "new_id": "596172b4ae955802a5778dd0c375b870b9a11909",
      "new_mode": 33188,
      "new_path": "drivers/pci/hotplug/acpiphp_glue.c"
    },
    {
      "type": "modify",
      "old_id": "4543b6f75867dfa4e6695e52e764cdd20c8f778d",
      "old_mode": 33188,
      "old_path": "include/acpi/acpiosxf.h",
      "new_id": "83062ed0ef2f7177285e6688a07e81db8c1a90e4",
      "new_mode": 33188,
      "new_path": "include/acpi/acpiosxf.h"
    }
  ]
}
