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: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Kirill Tkhai 2016-06-16 18:22:00 +03:00 committed by Pavel Emelyanov
parent 52d6ae030a
commit 7ea3ed952f
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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;