]> git.droids-corp.org - dpdk.git/commit
net/bnxt: add null check for mark table
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Tue, 4 Jan 2022 08:38:15 +0000 (14:08 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 12 Jan 2022 01:57:31 +0000 (02:57 +0100)
commit8a553bdf261f4e05a774d243bf0278ac1baf55c8
treedbf0551c4c1dfbfaa747dcb851b3ecea90e3dca2
parentcaf6c007da5e969a538e325e2d027dbfa55eb58c
net/bnxt: add null check for mark table

During the port start, driver ignores mark table allocation failure.
This could cause a segfault due to NULL pointer dereference in
bnxt_set_mark_in_mbuf(). Fix this by checking the pointer validity
before accessing it.

Fixes: b87abb2e55cb ("net/bnxt: support marking packet")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_rxr.c