netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: netdev@vger.kernel.org, Phil Sutter <phil@nwl.cc>
Subject: Re: [iproute PATCH] lib/namespace: avoid double-mounting a /sys
Date: Fri, 27 Jul 2018 13:45:05 -0700	[thread overview]
Message-ID: <20180727134505.4065994f@xeon-e3> (raw)
In-Reply-To: <20180724172638.760873-1-lkundrak@v3.sk>

On Tue, 24 Jul 2018 19:26:38 +0200
Lubomir Rintel <lkundrak@v3.sk> wrote:

> This partly reverts 8f0807023d067e2bb585a2ae8da93e59689d10f1, bringing
> back the umount(/sys) attempt.
> 
> In a LXC container we're unable to umount the sysfs instance, nor mount
> a read-write one. We still are able to create a new read-only instance.
> 
> Nevertheless, it still makes sense to attempt the umount() even though
> the sysfs is mounted read-only. Otherwise we may end up attempting to
> mount a sysfs with the same flags as is already mounted, resulting in
> an EBUSY error (meaning "Already mounted").
> 
> Perhaps this is not a very likely scenario in real world, but we hit
> it in NetworkManager test suite and makes netns_switch() somewhat more
> robust. It also fixes the case, when /sys wasn't mounted at all.
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

Makes sens applied.

      reply	other threads:[~2018-07-27 22:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 17:26 [iproute PATCH] lib/namespace: avoid double-mounting a /sys Lubomir Rintel
2018-07-27 20:45 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180727134505.4065994f@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=lkundrak@v3.sk \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).