Skip to content

Commit

Permalink
net/bnxt: fix null dereference in interrupt handler
Browse files Browse the repository at this point in the history
[ upstream commit 3f44ec4 ]

Coverity reports that pointer "cpr->cp_ring_struct" may be
dereferenced with null value. This patch fixes this.

Coverity issue: 372063
Fixes: 5ed30db ("net/bnxt: fix missing barriers in completion handling")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
  • Loading branch information
Kalesh AP authored and cpaelzer committed Aug 10, 2021
1 parent 72c1cc5 commit 8945c5a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/bnxt/bnxt_irq.c
Expand Up @@ -45,6 +45,7 @@ void bnxt_int_handler(void *param)
return;
}

cp_ring_size = cpr->cp_ring_struct->ring_size;
cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
cmp = &cpr->cp_desc_ring[cons];

Expand Down

0 comments on commit 8945c5a

Please sign in to comment.