diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_tables_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 9ce30534f853..2a22a186eb3d 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c | |||
@@ -1989,13 +1989,13 @@ static int nf_tables_set_alloc_name(struct nft_ctx *ctx, struct nft_set *set, | |||
1989 | 1989 | ||
1990 | if (!sscanf(i->name, name, &tmp)) | 1990 | if (!sscanf(i->name, name, &tmp)) |
1991 | continue; | 1991 | continue; |
1992 | if (tmp < 0 || tmp > BITS_PER_LONG * PAGE_SIZE) | 1992 | if (tmp < 0 || tmp >= BITS_PER_BYTE * PAGE_SIZE) |
1993 | continue; | 1993 | continue; |
1994 | 1994 | ||
1995 | set_bit(tmp, inuse); | 1995 | set_bit(tmp, inuse); |
1996 | } | 1996 | } |
1997 | 1997 | ||
1998 | n = find_first_zero_bit(inuse, BITS_PER_LONG * PAGE_SIZE); | 1998 | n = find_first_zero_bit(inuse, BITS_PER_BYTE * PAGE_SIZE); |
1999 | free_page((unsigned long)inuse); | 1999 | free_page((unsigned long)inuse); |
2000 | } | 2000 | } |
2001 | 2001 | ||