summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2011-10-17 21:04:20 +0000
committerDavid S. Miller <davem@davemloft.net>2011-10-19 19:35:51 -0400
commit4f25af27827080c3163e59c7af1ca84a05ce121c (patch)
tree393c42c11b7876456b8cdca6f94ff5d7c301337b /include
parent79de9efdb93d8e693dccd0eb7d80cd6092f5875b (diff)
downloadlinux-3.10-4f25af27827080c3163e59c7af1ca84a05ce121c.tar.gz
linux-3.10-4f25af27827080c3163e59c7af1ca84a05ce121c.tar.bz2
linux-3.10-4f25af27827080c3163e59c7af1ca84a05ce121c.zip
filter: use unsigned int to silence static checker warning
This is just a cleanup. My testing version of Smatch warns about this: net/core/filter.c +380 check_load_and_stores(6) warn: check 'flen' for negative values flen comes from the user. We try to clamp the values here between 1 and BPF_MAXINSNS but the clamp doesn't work because it could be negative. This is a bug, but it's not exploitable. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/filter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 741956fa5bf..8eeb205f298 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -155,7 +155,7 @@ extern unsigned int sk_run_filter(const struct sk_buff *skb,
const struct sock_filter *filter);
extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
extern int sk_detach_filter(struct sock *sk);
-extern int sk_chk_filter(struct sock_filter *filter, int flen);
+extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen);
#ifdef CONFIG_BPF_JIT
extern void bpf_jit_compile(struct sk_filter *fp);