]> git.baikalelectronics.ru Git - kernel.git/commit
[NETLINK]: negative groups in netlink_setsockopt
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 18 Jul 2007 09:07:51 +0000 (02:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jul 2007 09:07:51 +0000 (02:07 -0700)
commitbbff4e5ab4f55eb5acf9ad804c5636f5cc4d8ed0
treed6007042cd1ca2ac1f2378ea93ce3878bec89d0b
parent4de9d30a6a946d45b6b1332b2d38fe8232a00642
[NETLINK]: negative groups in netlink_setsockopt

Reading netlink_setsockopt it's not immediately clear why there isn't a
bug when you pass in negative numbers, the reason being that the >=
comparison is really unsigned although 'val' is signed because
nlk->ngroups is unsigned. Make 'val' unsigned too.

[ Update the get_user() cast to match.  --DaveM ]

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c