)]}'
{
  "commit": "c8c00a6915a2e3d10416e8bdd3138429beb96210",
  "tree": "ecf06a9e2b08edefe707da450b52a69f818ec7d6",
  "parents": [
    "7b2aa037e878c939676675969983284a02958ae3"
  ],
  "author": {
    "name": "NeilBrown",
    "email": "neilb@suse.de",
    "time": "Mon Aug 10 12:50:52 2009 +1000"
  },
  "committer": {
    "name": "NeilBrown",
    "email": "neilb@suse.de",
    "time": "Mon Aug 10 12:50:52 2009 +1000"
  },
  "message": "Remove deadlock potential in md_open\n\nA recent commit:\n  commit 449aad3e25358812c43afc60918c5ad3819488e7\n\nintroduced the possibility of an A-B/B-A deadlock between\nbd_mutex and reconfig_mutex.\n\n__blkdev_get holds bd_mutex while calling md_open which takes\n   reconfig_mutex,\ndo_md_run is always called with reconfig_mutex held, and it now\n   takes bd_mutex in the call the revalidate_disk.\n\nThis potential deadlock was not caught by lockdep due to the\nuse of mutex_lock_interruptible_nexted which was introduced\nby\n   commit d63a5a74dee87883fda6b7d170244acaac5b05e8\ndo avoid a warning of an impossible deadlock.\n\nIt is quite possible to split reconfig_mutex in to two locks.\nOne protects the array data structures while it is being\nreconfigured, the other ensures that an array is never even partially\nopen while it is being deactivated.\nIn particular, the second lock prevents an open from completing\nbetween the time when do_md_stop checks if there are any active opens,\nand the time when the array is either set read-only, or when -\u003epers is\nset to NULL.  So we can be certain that no IO is in flight as the\narray is being destroyed.\n\nSo create a new lock, open_mutex, just to ensure exclusion between\n\u0027open\u0027 and \u0027stop\u0027.\n\nThis avoids the deadlock and also avoids the lockdep warning mentioned\nin commit d63a5a74d\n\nReported-by: \"Mike Snitzer\" \u003csnitzer@gmail.com\u003e\nReported-by: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nSigned-off-by: NeilBrown \u003cneilb@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5b98bea4ff9b36ccd132398dd9f8cc5e5568b8f4",
      "old_mode": 33188,
      "old_path": "drivers/md/md.c",
      "new_id": "5614500092e3673b7ca7d9629e27b67ede765edb",
      "new_mode": 33188,
      "new_path": "drivers/md/md.c"
    },
    {
      "type": "modify",
      "old_id": "78f03168baf93a8949ca534aa2c13ceb34edf69b",
      "old_mode": 33188,
      "old_path": "drivers/md/md.h",
      "new_id": "f8fc188bc762d4b6fe1ffb5dadc9ac43a36d6dff",
      "new_mode": 33188,
      "new_path": "drivers/md/md.h"
    }
  ]
}
