qed: Prevent creation of too-big u32-chains
authorTomer Tayar <Tomer.Tayar@cavium.com>
Tue, 14 Mar 2017 13:25:59 +0000 (15:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Mar 2017 18:37:04 +0000 (11:37 -0700)
commit3ef310a7d99216e0fbdff29f0cb13bc54180373a
tree4c7394bf5fba719533e1333d78f0250e23058953
parentf3e48119b97f56fb09310c95d49da122a27003d7
qed: Prevent creation of too-big u32-chains

Current Logic would allow the creation of a chain with U32_MAX + 1
elements, when the actual maximum supported by the driver infrastructure
is U32_MAX.

Fixes: a91eb52abb50 ("qed: Revisit chain implementation")
Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_dev.c