[CRIU] p.haul: mtouch test "Pre-dump failed"
Cyrill Gorcunov
gorcunov at gmail.com
Sun Mar 30 03:00:01 PDT 2014
On Sun, Mar 30, 2014 at 01:41:43PM +0400, Andrew Vagin wrote:
> >
> > - if (fstatfs(lfd, &buf)) {
> > - pr_perror("Can't fstatfs file");
> > + snprintf(t, sizeof(t), "/proc/%d/fd/%d", pid, fd);
> > + ret = readlink(t, link, sizeof(link));
> > + if (ret < 0) {
> > + pr_perror("Can't read link of fd %d", fd);
> > + return -1;
> > + } else if ((size_t)ret == sizeof(link)) {
> > + pr_err("Buffer for read link of fd %d is too small\n", fd);
> > return -1;
> > }
>
> link is only 32 bytes. Is it ok?
Good point. Better to provide PATH_MAX instead.
More information about the CRIU
mailing list