)]}'
{
  "commit": "22213318af7ae265bc6cd8aef2febbc2d69a2440",
  "tree": "bb9b6c5e25909555f5243d8983d07c96cfeb08a9",
  "parents": [
    "c9eaa447e77efe77b7fa4c953bd62de8297fd6c5"
  ],
  "author": {
    "name": "Al Viro",
    "email": "viro@zeniv.linux.org.uk",
    "time": "Sat Apr 19 12:30:58 2014 -0400"
  },
  "committer": {
    "name": "Al Viro",
    "email": "viro@zeniv.linux.org.uk",
    "time": "Sat Apr 19 12:30:58 2014 -0400"
  },
  "message": "fix races between __d_instantiate() and checks of dentry flags\n\nin non-lazy walk we need to be careful about dentry switching from\nnegative to positive - both -\u003ed_flags and -\u003ed_inode are updated,\nand in some places we might see only one store.  The cases where\ndentry has been obtained by dcache lookup with -\u003ei_mutex held on\nparent are safe - -\u003ed_lock and -\u003ei_mutex provide all the barriers\nwe need.  However, there are several places where we run into\ntrouble:\n\t* do_last() fetches -\u003ed_inode, then checks -\u003ed_flags and\nassumes that inode won\u0027t be NULL unless d_is_negative() is true.\nRace with e.g. creat() - we might have fetched the old value of\n-\u003ed_inode (still NULL) and new value of -\u003ed_flags (already not\nDCACHE_MISS_TYPE).  Lin Ming has observed and reported the resulting\noops.\n\t* a bunch of places checks -\u003ed_inode for being non-NULL,\nthen checks -\u003ed_flags for \"is it a symlink\".  Race with symlink(2)\nin case if our CPU sees -\u003ed_inode update first - we see non-NULL\nthere, but -\u003ed_flags still contains DCACHE_MISS_TYPE instead of\nDCACHE_SYMLINK_TYPE.  Result: false negative on \"should we follow\nlink here?\", with subsequent unpleasantness.\n\nCc: stable@vger.kernel.org # 3.13 and 3.14 need that one\nReported-and-tested-by: Lin Ming \u003cminggr@gmail.com\u003e\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "40707d88a9452aea7c995198c2d94bfb1e9775c5",
      "old_mode": 33188,
      "old_path": "fs/dcache.c",
      "new_id": "494a9def5dced9af43b4cf6c1bfa50d6d010322a",
      "new_mode": 33188,
      "new_path": "fs/dcache.c"
    },
    {
      "type": "modify",
      "old_id": "c6157c894fce234c333d5a2d787f81ee3e5e7ba9",
      "old_mode": 33188,
      "old_path": "fs/namei.c",
      "new_id": "80168273396bbaeb4490677854fe34d637a78551",
      "new_mode": 33188,
      "new_path": "fs/namei.c"
    }
  ]
}
