net/bnxt: create ring group array only when needed
authorLance Richardson <lance.richardson@broadcom.com>
Wed, 10 Jul 2019 17:11:19 +0000 (13:11 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 23 Jul 2019 12:31:35 +0000 (14:31 +0200)
commit0603752e747978a55a2402be33af333b603c88b8
treec9ba370a21dc46ed721823056ad51c2163a29a55
parent0944e1e6801b8231eac0b1de8eac62ab85236f9f
net/bnxt: create ring group array only when needed

Fix an overrun of the ring group array with BCM5750X-based
adapters by ensuring that the ring group array is not allocated
or accessed for adapters that do not support ring groups.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_ring.c