qcacmn: Add debug log to trap unsuccessful dbr vaddr lookup
In direct buf rx, if physical address is not intact or is corrupt, the dbr lookup for vaddr will fail and result in vaddr being NULL. There is no validation for this vaddr in the caller and hence results in NULL access in the callstack. Add debug log and return error status when dbr vaddr lookup fails, which indicates that there is corruption in paddr received and avoid NULL access. Change-Id: I76ee300ce3e686765dd5c4ee73fa71d1735c163a CRs-Fixed: 2748529
This commit is contained in:
parent
64476bcd6c
commit
2bd4ec3c09
@ -1620,6 +1620,12 @@ static QDF_STATUS target_if_get_dbr_data(struct wlan_objmgr_pdev *pdev,
|
||||
*cookie = WMI_HOST_DBR_DATA_ADDR_HI_HOST_DATA_GET(
|
||||
dbr_rsp->dbr_entries[idx].paddr_hi);
|
||||
dbr_data->vaddr = target_if_dbr_vaddr_lookup(mod_param, paddr, *cookie);
|
||||
|
||||
if (!dbr_data->vaddr) {
|
||||
direct_buf_rx_err("dbr vaddr lookup failed, vaddr NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
dbr_data->cookie = *cookie;
|
||||
dbr_data->paddr = paddr;
|
||||
direct_buf_rx_debug("Cookie = %d Vaddr look up = %pK",
|
||||
|
Loading…
Reference in New Issue
Block a user