summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/linux/netfilter_ipv4/ip_set_hashes.h')
-rw-r--r--kernel/include/linux/netfilter_ipv4/ip_set_hashes.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h b/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h
index 6914a12..4ca8431 100644
--- a/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h
+++ b/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h
@@ -28,20 +28,22 @@ type##_retry(struct ip_set *set) \
hashsize++; \
\
ip_set_printk("rehashing of set %s triggered: " \
- "hashsize grows from %u to %u", \
- set->name, map->hashsize, hashsize); \
+ "hashsize grows from %lu to %lu", \
+ set->name, \
+ (long unsigned)map->hashsize, \
+ (long unsigned)hashsize); \
\
tmp = kmalloc(sizeof(struct ip_set_##type) \
+ map->probes * sizeof(initval_t), GFP_ATOMIC); \
if (!tmp) { \
- DP("out of memory for %d bytes", \
+ DP("out of memory for %lu bytes", \
sizeof(struct ip_set_##type) \
+ map->probes * sizeof(initval_t)); \
return -ENOMEM; \
} \
tmp->members = harray_malloc(hashsize, sizeof(dtype), GFP_ATOMIC);\
if (!tmp->members) { \
- DP("out of memory for %d bytes", hashsize * sizeof(dtype));\
+ DP("out of memory for %lu bytes", hashsize * sizeof(dtype));\
kfree(tmp); \
return -ENOMEM; \
} \
@@ -88,7 +90,7 @@ type##_retry(struct ip_set *set) \
#define HASH_CREATE(type, dtype) \
static int \
-type##_create(struct ip_set *set, const void *data, size_t size) \
+type##_create(struct ip_set *set, const void *data, u_int32_t size) \
{ \
const struct ip_set_req_##type##_create *req = data; \
struct ip_set_##type *map; \
@@ -107,7 +109,7 @@ type##_create(struct ip_set *set, const void *data, size_t size) \
map = kmalloc(sizeof(struct ip_set_##type) \
+ req->probes * sizeof(initval_t), GFP_KERNEL); \
if (!map) { \
- DP("out of memory for %d bytes", \
+ DP("out of memory for %lu bytes", \
sizeof(struct ip_set_##type) \
+ req->probes * sizeof(initval_t)); \
return -ENOMEM; \
@@ -124,7 +126,7 @@ type##_create(struct ip_set *set, const void *data, size_t size) \
} \
map->members = harray_malloc(map->hashsize, sizeof(dtype), GFP_KERNEL);\
if (!map->members) { \
- DP("out of memory for %d bytes", map->hashsize * sizeof(dtype));\
+ DP("out of memory for %lu bytes", map->hashsize * sizeof(dtype));\
kfree(map); \
return -ENOMEM; \
} \