[CRIU] Error (namespaces.c:965): BUG at namespaces.c:965

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Wed Mar 30 09:57:40 PDT 2016


Hello,

There is a commit 85ebf0a83b2a1d1eada1989b33f3208b80507db9, which 
introduced this hunk:

@@ -918,8 +949,10 @@ static int usernsd(int sk)
                         return -1;
                 }

-               fd = unsc_msg_fd(&um);
-               pr_debug("UNS: daemon calls %p (%d, %x)\n", call, fd, 
flags);
+               unsc_msg_pid_fd(&um, &pid, &fd);
+               pr_debug("UNS: daemon calls %p (%d, %d, %x)\n", call, 
pid, fd, flags);
+
+               BUG_ON(fd < 0 && flags & UNS_FDOUT);

                 /*
                  * Caller has sent us bare address of the routine it

Could you, please, explain, what was the reason to prevent returning 
file descriptor, if provided one is negative (BUG_ON)?
A brief look at the code doesn't explain, why uns can't be used _only_ 
to open some file and return its descriptor.

Thanks in advance,
Stanislav Kinsburskiy




More information about the CRIU mailing list