mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
qcacld-3.0: Drop packets when vdev_id is invalid
There is a race condition when adapter is deleted after it is validated in DP rx path and is assigned an invalid vdev id and eventually invalid net_device. To fix this, dropping packets if vdev id is found to be invalid right before assignment to skb->cb. Change-Id: I4e483363f59a22b45e18da929f749cd9807cc2fc CRs-Fixed: 3084556
This commit is contained in:
parent
3801523a38
commit
3eff34087b
1 changed files with 7 additions and 0 deletions
|
|
@ -2150,6 +2150,13 @@ QDF_STATUS hdd_rx_pkt_thread_enqueue_cbk(void *adapter,
|
|||
return hdd_adapter->rx_stack(adapter, nbuf_list);
|
||||
|
||||
vdev_id = hdd_adapter->vdev_id;
|
||||
|
||||
if (vdev_id >= WLAN_UMAC_VDEV_ID_MAX) {
|
||||
hdd_info_rl("Vdev invalid. Dropping packets");
|
||||
qdf_nbuf_list_free(nbuf_list);
|
||||
return QDF_STATUS_E_NETDOWN;
|
||||
}
|
||||
|
||||
head_ptr = nbuf_list;
|
||||
while (head_ptr) {
|
||||
qdf_nbuf_cb_update_vdev_id(head_ptr, vdev_id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue