Commit 17f163a6 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Andrei Vagin

usernsd: Add debugging to catch BUG in unsd fd/flags mismatch

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 5902eb21
...@@ -1216,7 +1216,10 @@ static int usernsd(int sk) ...@@ -1216,7 +1216,10 @@ static int usernsd(int sk)
unsc_msg_pid_fd(&um, &pid, &fd); unsc_msg_pid_fd(&um, &pid, &fd);
pr_debug("uns: daemon calls %p (%d, %d, %x)\n", call, pid, fd, flags); pr_debug("uns: daemon calls %p (%d, %d, %x)\n", call, pid, fd, flags);
BUG_ON(fd < 0 && flags & UNS_FDOUT); if (fd < 0 && flags & UNS_FDOUT) {
pr_err("uns: bad flags/fd %p %d %x\n", call, fd, flags);
BUG();
}
/* /*
* Caller has sent us bare address of the routine it * Caller has sent us bare address of the routine it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment