fib_trie: Prevent allocating tnode if bits is too big for size_t
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Wed, 4 Mar 2015 23:04:46 +0000 (15:04 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Mar 2015 04:35:18 +0000 (23:35 -0500)
commit1de3d87bcd2c2e631500b9e4f0c40b38ce0d0d57
tree9c5454c691c99de935aab3699cf85cf97151a68b
parent71e8b67d0fdd2fe22a657bb98716c5cf0e31e828
fib_trie: Prevent allocating tnode if bits is too big for size_t

This patch adds code to prevent us from attempting to allocate a tnode with
a size larger than what can be represented by size_t.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c