)]}'
{
  "commit": "b4b610f684d13bf8691feeae5d4d7a8bd1f1033e",
  "tree": "3226c70f318f494d3c6a6707879ba82ebec900b9",
  "parents": [
    "eccf081799be8d83852f183838bf26e1ca099db4"
  ],
  "author": {
    "name": "Alasdair G Kergon",
    "email": "agk@redhat.com",
    "time": "Mon Mar 27 01:17:44 2006 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@g5.osdl.org",
    "time": "Mon Mar 27 08:44:58 2006 -0800"
  },
  "message": "[PATCH] device-mapper snapshot: replace sibling list\n\nThe siblings \"list\" is used unsafely at the moment.\n\nFirstly, only the element on the list being changed gets locked (via the\nsnapshot lock), not the next and previous elements which have pointers that\nare also being changed.\n\nSecondly, if you have two or more snapshots and write to the same chunk a\nsecond time before every snapshot has finished making its private copy of the\ndata, if you\u0027re unlucky, _origin_write() could attempt its list_merge() and\ndereference a \u0027last\u0027 pointer to a pending_exception structure that has just\nbeen freed.\n\nAnalysis reveals that the list is actually only there for reference counting.\nIf 5 pending_exceptions are needed in origin_write, then the 5 are joined\ntogether into a 5-element list - without a separate list head because there\u0027s\nnowhere suitable to store it.  As the pending_exceptions complete, they are\nremoved from the list one-by-one and any contents of origin_bios get moved\nacross to one of the remaining pending_exceptions on the list.  Whichever one\nis last is detected because list_empty() is then true and the origin_bios get\nsubmitted.\n\nThe fix proposed here uses an alternative reference counting mechanism by\nchoosing one of the pending_exceptions as primary and maintaining an atomic\ncounter there.\n\nSigned-off-by: Alasdair G Kergon \u003cagk@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "874f145431d87a51b957916bf2a7213ee1dad3c9",
      "old_mode": 33188,
      "old_path": "drivers/md/dm-snap.c",
      "new_id": "475514bda9d0f7c87c131e7f361e2b35a8090030",
      "new_mode": 33188,
      "new_path": "drivers/md/dm-snap.c"
    }
  ]
}
