mirror_iproute2/lib
Lubomir Rintel 3655f788d3 lib/namespace: avoid double-mounting a /sys
This partly reverts 8f0807023d, 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>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-07-27 13:40:12 -07:00
..
bpf.c ip: add support for seg6local End.BPF action 2018-07-18 15:56:18 -07:00
color.c color: disable color when json output is requested 2018-02-23 08:18:33 -08:00
coverity_model.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
dnet_ntop.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
dnet_pton.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
exec.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
fs.c Convert the obvious cases to strlcpy() 2017-09-01 12:10:54 -07:00
inet_proto.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
ipx_ntop.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
ipx_pton.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
json_print.c json_print: Fix hidden 64-bit type promotion 2018-04-25 11:08:55 -07:00
json_writer.c json_print: Fix hidden 64-bit type promotion 2018-04-25 11:08:55 -07:00
libgenl.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
libnetlink.c libnetlink: __rtnl_talk_iov should only loop max iovlen times 2018-03-02 13:30:34 -08:00
ll_addr.c utils: ll_addr: Handle ARPHRD_IP6GRE in ll_addr_n2a() 2017-12-26 09:07:42 -08:00
ll_map.c utils: Reimplement ll_idx_n2a() and introduce ll_idx_a2n() 2018-02-16 08:14:13 -08:00
ll_proto.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
ll_types.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
Makefile lib: Correct object file dependencies 2018-02-16 08:14:18 -08:00
mpls_ntop.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
mpls_pton.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
names.c Replace malloc && memset by calloc 2016-07-20 12:05:24 -07:00
namespace.c lib/namespace: avoid double-mounting a /sys 2018-07-27 13:40:12 -07:00
rt_names.c iproute2: Add support for a few routing protocols 2018-06-11 11:18:30 -07:00
utils.c tc: allow 0% for percent options 2018-05-17 16:20:50 -07:00