• Andrey Vagin's avatar
    unix: restore sockets on correct mount points · 019ebec0
    Andrey Vagin authored
    Currently we restore all sockets in the root mount namespace, because we
    were not able to get any information about a mount point where a socket
    is bound. It is obviously incorrect in some cases.
    
    In 4.10 kernel, we added the SIOCUNIXFILE ioctl for unix sockets.  This
    ioctl opens a file to which a socket is bound and returns a file
    descriptor.
    
    This new ioctl allows us to get mnt_id by reading fdinfo, and mnt_id
    is enough to find a proper mount point and a mount namespace.
    
    The logic of this patch is straight forward. On dump, we save mnt_id for
    sockets, on restore we find a mount namespace by mnt_id and restore this
    socket in its mount namespace.
    Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    019ebec0
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...