Commit 708abf40 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

namespaces: Use long value to check for UINT_MAX

We have a condition

	BUG_ON(kid > UINT_MAX);

but kid is unsigned int so it's never bigger than UINT_MAX,
use unsigned long instead.

CID 1042296
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 5d4e86ae
......@@ -27,7 +27,7 @@ static struct ns_desc *ns_desc_array[] = {
static unsigned int parse_ns_link(char *link, size_t len, struct ns_desc *d)
{
unsigned int kid = 0;
unsigned long kid = 0;
char *end;
if (len >= d->len + 2) {
......@@ -40,7 +40,7 @@ static unsigned int parse_ns_link(char *link, size_t len, struct ns_desc *d)
}
}
return kid;
return (unsigned int)kid;
}
bool check_ns_proc(struct fd_link *link)
......
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