)]}'
{
  "commit": "537d59af73d894750cff14f90fe2b6d77fbab15b",
  "tree": "bff5d6efbffbf6685cac5698efe7e3192e391047",
  "parents": [
    "c3b25b32e8bef526cca748e1ba023c6bdd705a99"
  ],
  "author": {
    "name": "Dave Young",
    "email": "hidave.darkstar@gmail.com",
    "time": "Sun Jun 01 23:50:52 2008 -0700"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Tue Jun 03 14:27:17 2008 -0700"
  },
  "message": "bluetooth: rfcomm_dev_state_change deadlock fix\n\nThere\u0027s logic in __rfcomm_dlc_close:\n\trfcomm_dlc_lock(d);\n\td-\u003estate \u003d BT_CLOSED;\n\td-\u003estate_changed(d, err);\n\trfcomm_dlc_unlock(d);\n\nIn rfcomm_dev_state_change, it\u0027s possible that rfcomm_dev_put try to\ntake the dlc lock, then we will deadlock.\n\nHere fixed it by unlock dlc before rfcomm_dev_get in\nrfcomm_dev_state_change.\n\nwhy not unlock just before rfcomm_dev_put? it\u0027s because there\u0027s\nanother problem.  rfcomm_dev_get/rfcomm_dev_del will take\nrfcomm_dev_lock, but in rfcomm_dev_add the lock order is :\nrfcomm_dev_lock --\u003e dlc lock\n\nso I unlock dlc before the taken of rfcomm_dev_lock.\n\nActually it\u0027s a regression caused by commit\n1905f6c736cb618e07eca0c96e60e3c024023428 (\"bluetooth :\n__rfcomm_dlc_close lock fix\"), the dlc state_change could be two\ncallbacks : rfcomm_sk_state_change and rfcomm_dev_state_change. I\nmissed the rfcomm_sk_state_change that time.\n\nThanks Arjan van de Ven \u003carjan@linux.intel.com\u003e for the effort in\ncommit 4c8411f8c115def968820a4df6658ccfd55d7f1a (\"bluetooth: fix\nlocking bug in the rfcomm socket cleanup handling\") but he missed the\nrfcomm_dev_state_change lock issue.\n\nSigned-off-by: Dave Young \u003chidave.darkstar@gmail.com\u003e\nAcked-by: Marcel Holtmann \u003cmarcel@holtmann.org\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c3f749abb2d07a1f99274fc71873d86e02f7e9b4",
      "old_mode": 33188,
      "old_path": "net/bluetooth/rfcomm/tty.c",
      "new_id": "c9191871c1e0921cf9b096a3fdcad79c28f30309",
      "new_mode": 33188,
      "new_path": "net/bluetooth/rfcomm/tty.c"
    }
  ]
}
