[CRIU] [PATCH 6/9] sysctl_op(): fix check for known ns mask
Kir Kolyshkin
kir at openvz.org
Wed Oct 7 02:44:21 PDT 2015
This must be boolean not logical NOT.
Reported by Coverity, CID 114612.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
sysctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysctl.c b/sysctl.c
index 1e7ee66..0290795 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -387,7 +387,7 @@ int sysctl_op(struct sysctl_req *req, size_t nr_req, int op, unsigned int ns)
if (nr_req == 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);
return -1;
}
--
2.4.3
More information about the CRIU
mailing list