)]}'
{
  "commit": "d0fedbcb01af5d27ef2e3300dc58387bc74e219d",
  "tree": "041350b7800eb769417ce77695ea6323f0799ce1",
  "parents": [
    "f91cd5b337dfac39ec70cbfc68dea6ff1e241ea1"
  ],
  "author": {
    "name": "Al Viro",
    "email": "viro@zeniv.linux.org.uk",
    "time": "Sat Jan 11 10:44:29 2020 -0500"
  },
  "committer": {
    "name": "Al Viro",
    "email": "viro@zeniv.linux.org.uk",
    "time": "Wed Jan 15 08:20:19 2020 -0500"
  },
  "message": "fix automount/automount race properly\n\nProtection against automount/automount races (two threads hitting the same\nreferral point at the same time) is based upon do_add_mount() prevention of\nidentical overmounts - trying to overmount the root of mounted tree with\nthe same tree fails with -EBUSY.  It\u0027s unreliable (the other thread might\u0027ve\nmounted something on top of the automount it has triggered) *and* causes\nno end of headache for follow_automount() and its caller, since\nfinish_automount() behaves like do_new_mount() - if the mountpoint to be is\novermounted, it mounts on top what\u0027s overmounting it.  It\u0027s not only wrong\n(we want to go into what\u0027s overmounting the automount point and quietly\ndiscard what we planned to mount there), it introduces the possibility of\noriginal parent mount getting dropped.  That\u0027s what 8aef18845266 (VFS: Fix\nvfsmount overput on simultaneous automount) deals with, but it can\u0027t do\nanything about the reliability of conflict detection - if something had\nbeen overmounted the other thread\u0027s automount (e.g. that other thread\nhaving stepped into automount in mount(2)), we don\u0027t get that -EBUSY and\nthe result is\n\t referral point under automounted NFS under explicit overmount\nunder another copy of automounted NFS\n\nWhat we need is finish_automount() *NOT* digging into overmounts - if it\nfinds one, it should just quietly discard the thing it was asked to mount.\nAnd don\u0027t bother with actually crossing into the results of finish_automount() -\nthe same loop that calls follow_automount() will do that just fine on the\nnext iteration.\n\nIOW, instead of calling lock_mount() have finish_automount() do it manually,\n_without_ the \"move into overmount and retry\" part.  And leave crossing into\nthe results to the caller of follow_automount(), which simplifies it a lot.\n\nMoral: if you end up with a lot of glue working around the calling conventions\nof something, perhaps these calling conventions are simply wrong...\n\nFixes: 8aef18845266 (VFS: Fix vfsmount overput on simultaneous automount)\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d2720dc71d0efc111c1c2da0f2d71acf5c39c39d",
      "old_mode": 33188,
      "old_path": "fs/namei.c",
      "new_id": "bd036dfdb0d91656907a03c17cce9b8556cfb439",
      "new_mode": 33188,
      "new_path": "fs/namei.c"
    },
    {
      "type": "modify",
      "old_id": "5f0a80f176514314cd0c816751865ea659c61cfb",
      "old_mode": 33188,
      "old_path": "fs/namespace.c",
      "new_id": "f1817eb5f87dda14405de9cccb6b2953fad57cc0",
      "new_mode": 33188,
      "new_path": "fs/namespace.c"
    }
  ]
}
