]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: remove hash::nelems check in netlink_insert
authorLi RongQing <lirongqing@baidu.com>
Tue, 11 Sep 2018 01:05:01 +0000 (09:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Sep 2018 07:08:44 +0000 (00:08 -0700)
commit9a04ad4b2b5e728c07d69bce6b5bc87157d6b169
tree1f0c49826312f1e69712e577309c6846b517e30b
parent29da07c6bbd39b8823d646a04ed843821186f0b4
netlink: remove hash::nelems check in netlink_insert

The type of hash::nelems has been changed from size_t to atom_t
which in fact is int, so not need to check if BITS_PER_LONG, that
is bit number of size_t, is bigger than 32

and rht_grow_above_max() will be called to check if hashtable is
too big, ensure it can not bigger than 1<<31

Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c