]> git.baikalelectronics.ru Git - kernel.git/commit
filter: use unsigned int to silence static checker warning
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 17 Oct 2011 21:04:20 +0000 (21:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Oct 2011 23:35:51 +0000 (19:35 -0400)
commitafe92677d882069d83867c72bb17182553419868
tree393c42c11b7876456b8cdca6f94ff5d7c301337b
parent0d987ddb90b3a8d8230ee65717b098d5c8fcbdec
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>
include/linux/filter.h
net/core/filter.c