netlink: Lower netlink error report log level

This most likely meand, that the respective -diag module is missing.
In that case the caller would check it and _might_ not fail the dump
at once. Thus treat it as error.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: don't destruct an external mount-namespace (v2)

If a parent mount point is shared with exteranl mntns, a child will be
umounted from the external mntns too.

For example:
$ mount -t tmpfs xxx /root/tmp/
$ mount --make-shared tmp
$ mkdir tmp/xxx
$ mount -t tmpfs xxx /root/tmp/xxx
$ touch tmp/xxx/a

$ unshare -m umount tmp/xxx
$ ls -l tmp/xxx/a
ls: cannot access tmp/xxx/a: No such file or directory

This patch changes a parent mnt to private for umounting childrens.

v2: exit if a mount point can not be marked ad private

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: don't destruct an external mount-namespace

Before doing something with mounts they should be marked as private,
otherwise our actions can affects someone else.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
files: don't compare unsigned value against 0

CID 1042292 (#1 of 1): Unsigned compared against 0 (NO_EFFECT)
unsigned_compare: This less-than-zero comparison of an unsigned value is
never true. "len < 0UL"

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
proc: fix memory leak

timer is not freed in case of eof.

CID 1042301 (#1 of 1): Resource leak (RESOURCE_LEAK)
15. leaked_storage: Variable timer going out of scope leaks the storage it points to.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
rst: Introduce memory allocator for rst blob

The memory in question is allocated and then remaped into
restorer with one call to mremap. Thus, to use the mem we
need to provide to users API for

* alloc memory
* get current allocation pointer
* convert current pointer into remapped one
* the remap itself

This would help combinding lots of small allocations such
as tcp sockets to unrepair, siginfos and posix timers.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
posix-timers: Switch to use rst memory allocator

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
siginfos: Switch to use rst memory allocator

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
tcp: Switch to use rst memory allocator on repair off

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>