Commit bf607a6e authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

sysctl_op(): fix check for known ns mask

This must be boolean not logical NOT.

Reported by Coverity, CID 114612.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 7073009b
...@@ -387,7 +387,7 @@ int sysctl_op(struct sysctl_req *req, size_t nr_req, int op, unsigned int ns) ...@@ -387,7 +387,7 @@ int sysctl_op(struct sysctl_req *req, size_t nr_req, int op, unsigned int ns)
if (nr_req == 0) if (nr_req == 0)
return 0; return 0;
if (ns & !KNOWN_NS_MASK) { if (ns & ~KNOWN_NS_MASK) {
pr_err("don't know how to restore some namespaces in %u\n", ns); pr_err("don't know how to restore some namespaces in %u\n", ns);
return -1; return -1;
} }
......
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