net/bnxt: fix crash during Tx
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Mon, 13 Jul 2020 05:17:59 +0000 (10:47 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jul 2020 16:21:21 +0000 (18:21 +0200)
commit9ecb2ce7826e2d8eabd6f3df27b76cfcab3e3fd1
tree7c2b832255f70967123df5f4579f2e25d33ff8d5
parentb02e1742ebb5a6c23bea05c4d66b1d380bcd00eb
net/bnxt: fix crash during Tx

When TRUFLOW is not enabled ulp_ctx is not allocated.
In non-vector Tx datapath we are accessing this invalid pointer
resulting in a segfault. Check if TRUFLOW is enabled before
accessing ulp_ctx to avoid this.

Fixes: 1e46b3962620 ("net/bnxt: fill cfa action in Tx descriptor")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
drivers/net/bnxt/bnxt_txr.c