)]}'
{
  "commit": "13f172ff26563995049abe73f6eeba828de3c09d",
  "tree": "deef6ba4f54596410ab873281709c7f46979ddc3",
  "parents": [
    "1ed3aad141fe595673c20225a9e004730088be52"
  ],
  "author": {
    "name": "Neil Horman",
    "email": "nhorman@tuxdriver.com",
    "time": "Fri Apr 22 08:10:59 2011 +0000"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Fri Apr 22 14:33:51 2011 -0700"
  },
  "message": "netconsole: fix deadlock when removing net driver that netconsole is using (v2)\n\nA deadlock was reported to me recently that occured when netconsole was being\nused in a virtual guest.  If the virtio_net driver was removed while netconsole\nwas setup to use an interface that was driven by that driver, the guest\ndeadlocked.  No backtrace was provided because netconsole was the only console\nconfigured, but it became clear pretty quickly what the problem was.  In\nnetconsole_netdev_event, if we get an unregister event, we call\n__netpoll_cleanup with the target_list_lock held and irqs disabled.\n__netpoll_cleanup can, if pending netpoll packets are waiting call\ncancel_delayed_work_sync, which is a sleeping path.  the might_sleep call in\nthat path gets triggered, causing a console warning to be issued.  The\nnetconsole write handler of course tries to take the target_list_lock again,\nwhich we already hold, causing deadlock.\n\nThe fix is pretty striaghtforward.  Simply drop the target_list_lock and\nre-enable irqs prior to calling __netpoll_cleanup, the re-acquire the lock, and\nrestart the loop.  Confirmed by myself to fix the problem reported.\n\nSigned-off-by: Neil Horman \u003cnhorman@tuxdriver.com\u003e\nCC: \"David S. Miller\" \u003cdavem@davemloft.net\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dfb67eb2a94b726cb590f8b3a015d98a719866d1",
      "old_mode": 33188,
      "old_path": "drivers/net/netconsole.c",
      "new_id": "eb41e44921e665c3863dd82860b7c44413c7ef5e",
      "new_mode": 33188,
      "new_path": "drivers/net/netconsole.c"
    }
  ]
}
