[CRIU] Re: [PATCH] sk-unix.c: Don't mangle name provided by diag
message if no mount point present
Cyrill Gorcunov
gorcunov at openvz.org
Thu Aug 30 10:54:39 EDT 2012
On Thu, Aug 30, 2012 at 06:53:11PM +0400, Andrew Vagin wrote:
> On Thu, Aug 30, 2012 at 06:15:45PM +0400, Cyrill Gorcunov wrote:
> > Otherwise we can't fetch stat.
> >
> > Reported-by: "Muralidhar, Rajeev D" <rajeev.d.muralidhar at intel.com>
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> > sk-unix.c | 5 ++++-
> > 1 files changed, 4 insertions(+), 1 deletions(-)
> >
> > diff --git a/sk-unix.c b/sk-unix.c
> > index 9a9323c..5758f69 100644
> > --- a/sk-unix.c
> > +++ b/sk-unix.c
> > @@ -277,7 +277,10 @@ static int unix_collect_one(const struct unix_diag_msg *m,
> > }
> >
> > uv = RTA_DATA(tb[UNIX_DIAG_VFS]);
> > - snprintf(rpath, sizeof(rpath), ".%s", name);
> > + if (mntns_root >= 0)
> > + snprintf(rpath, sizeof(rpath), ".%s", name);
> > + else
> > + snprintf(rpath, sizeof(rpath), "%s", name);
> We should initialize mnt_root = open("/", O_RONLY)
OK, letme try.
Cyrill
More information about the CRIU
mailing list