Commit 7ea3ed95 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov

sockets: Fix int ino parameter of socket functions

Real ino is u32, while parameters are int. Fix that
to prevent crap with overflows.
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 52d6ae03
......@@ -33,7 +33,7 @@ extern void preload_socket_modules();
extern bool socket_test_collect_bit(unsigned int family, unsigned int proto);
extern int sk_collect_one(int ino, int family, struct socket_desc *d);
extern int sk_collect_one(unsigned ino, int family, struct socket_desc *d);
struct ns_id;
extern int collect_sockets(struct ns_id *);
extern int collect_inet_sockets(void);
......@@ -42,7 +42,7 @@ extern int fix_external_unix_sockets(void);
extern struct collect_image_info netlink_sk_cinfo;
extern struct socket_desc *lookup_socket(int ino, int family, int proto);
extern struct socket_desc *lookup_socket(unsigned ino, int family, int proto);
extern const struct fdtype_ops unix_dump_ops;
extern const struct fdtype_ops inet_dump_ops;
......
......@@ -330,7 +330,7 @@ static int restore_socket_filter(int sk, SkOptsEntry *soe)
static struct socket_desc *sockets[SK_HASH_SIZE];
struct socket_desc *lookup_socket(int ino, int family, int proto)
struct socket_desc *lookup_socket(unsigned ino, int family, int proto)
{
struct socket_desc *sd;
......@@ -350,7 +350,7 @@ struct socket_desc *lookup_socket(int ino, int family, int proto)
return NULL;
}
int sk_collect_one(int ino, int family, struct socket_desc *d)
int sk_collect_one(unsigned ino, int family, struct socket_desc *d)
{
struct socket_desc **chain;
......
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