net/bnxt: validate structs and pointers before use
authorRahul Gupta <rahul.gupta@broadcom.com>
Tue, 1 May 2018 01:06:09 +0000 (18:06 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:48 +0000 (22:31 +0100)
commitf7b36e8f36e8f3bbebd9f4843466580354aa8179
tree5a11e06b92c3f9669ab46d26f32e96acee4ae5a7
parenta42b152abaf40caf966d24bb1a17d6928a5ab12f
net/bnxt: validate structs and pointers before use

Validate pointers aren't pointing to uninitialized areas
including txq and rxq before using them to avoid
bnxt driver from crashing.

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Tested-by: Randy Schacher <stuart.schacher@broadcom.com>
drivers/net/bnxt/bnxt_ring.c
drivers/net/bnxt/bnxt_rxq.c
drivers/net/bnxt/bnxt_txq.c