]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nfp: protect from theoretical size overflows on HW descriptor ring
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 26 Jul 2018 02:40:37 +0000 (19:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Jul 2018 05:17:44 +0000 (22:17 -0700)
commit5ea14712d7a22703645217c5296e72cb5adba0a6
tree4179e0924b2d71193267da4cc6d9a2e97dbd12fb
parente76c1d3d2a8313040d8316f760e9476028a27758
nfp: protect from theoretical size overflows on HW descriptor ring

Use array_size() and store the size as full size_t to protect from
theoretical size overflow when handling HW descriptor rings.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net.h
drivers/net/ethernet/netronome/nfp/nfp_net_common.c