qcacmn: Validate the rx descriptor before dereferencing

The rx descriptor obtained using the cookie
can be NULL if the cookie is invalid. Hence
dereferencing the rx descriptor without any
validation can cause invalid address access.

Fix this by validating the rx descriptor
which has been obtained using the cookie from
the hal ring descriptor.

Change-Id: Ib584f0d8175b581d15b0e1c67d2f6ed9119ecbfc
CRs-Fixed: 2629254
这个提交包含在:
Rakesh Pillai
2020-02-29 20:42:28 +05:30
提交者 nshrivas
父节点 605e44bf31
当前提交 7a26da4e7e
修改 3 个文件,包含 46 行新增1 行删除

查看文件

@@ -6033,6 +6033,9 @@ dp_print_soc_rx_stats(struct dp_soc *soc)
DP_PRINT_STATS("RX scatter msdu: %d",
soc->stats.rx.err.scatter_msdu);
DP_PRINT_STATS("RX invalid cookie: %d",
soc->stats.rx.err.invalid_cookie);
DP_PRINT_STATS("RX wait completed msdu break: %d",
soc->stats.rx.msdu_scatter_wait_break);