Make parent mount private before bind mounting rootfs
Make parent mount private before bind mounting rootfs

This reverts part of the commit eb0a144b5e383

That commit introduced two issues.

- We need to make parent mount of rootfs private before bind mounting
  rootfs. Otherwise bind mounting root can propagate in other mount
  namespaces. (If parent mount is shared).

- It broke test TestRootfsPropagationSharedMount() on Fedora.

  On fedora /tmp is a mount point with "shared" propagation. I think
  you should be able to reproduce it on other distributions as well
  as long as you mount tmpfs on /tmp and make it "shared" propagation.

  Reason for failure is that pivot_root() fails. And it fails because
  kernel does following check.

  IS_MNT_SHARED(new_mnt->mnt_parent)

  Say /tmp/foo is new rootfs, we have bind mounted rootfs, so new_mnt
  is /tmp/foo, and new_mnt->mnt_parent is /tmp which is "shared" on
  fedora and above check fails.

So this change broke few things, it is a good idea to revert part of it.

Signed-off-by: Vivek Goyal <61d11262d0d9873ddb5a887f48fcb04e8c5973d0@redhat.com>

opencontainers/runc,kolyshkin/runc,cloudfoundry-incubator/runc,cyphar/runc,maxamillion/runc,wking/runc,rhatdan/runc,laijs/runc,WeiZhang555/runc,xiaochenshen/runc,cloudfoundry-incubator/runc,vbatts/runc,jhowardmsft/runc,WeiZhang555/runc,hqhq/runc,vbatts/runc,adrianreber/runc,adrianreber/runc,avagin/runc,stefanberger/runc,mikebrow/runc,rajasec/runc,mikebrow/runc,crosbymichael/runc,rhatdan/runc,coolljt0725/runc,coolljt0725/runc,WeiZhang555/runc,shishir-a412ed/runc,docker/runc,coolljt0725/runc,estesp/runc,mYmNeo/runc,wking/runc,maxamillion/runc,rajasec/runc,kolyshkin/runc,cyphar/runc,rhatdan/runc,avagin/runc,kolyshkin/runc,jhowardmsft/runc,sunyuan3/runc,rhatdan/runc,stefanberger/runc,sunyuan3/runc,estesp/runc,rajasec/runc,hqhq/runc,kolyshkin/runc,mheon/runc,opencontainers/runc,hqhq/runc,shishir-a412ed/runc,mheon/runc,mYmNeo/runc,dqminh/runc,vbatts/runc,avagin/runc,docker/runc,justincormack/runc,opencontainers/runc,justincormack/runc,xiaochenshen/runc,stefanberger/runc,crosbymichael/runc,cyphar/runc,opencontainers/runc,sunyuan3/runc,wking/runc,shishir-a412ed/runc,crosbymichael/runc,adrianreber/runc,mheon/runc,dqminh/runc,laijs/runc,xiaochenshen/runc,laijs/runc,jhowardmsft/runc,dqminh/runc,maxamillion/runc,mikebrow/runc,mYmNeo/runc,estesp/runc,dqminh/runc,docker/runc,cloudfoundry-incubator/runc,justincormack/runc