소스 검색

qcacld-3.0: Add NULL check for adapter in hdd_nud_filter_netevent

API hdd_nud_filter_netevent is used to filter netevents for
STA interface. It is the driver's responsibility to
filter and act on event if it is for the net device. However,
the NULL check that is present in hdd_validate_adapter comes
with error logs which flood the console.

Add NULL check for adapter after call to hdd_get_adapter_by_macaddr
in hdd_nud_filter_netevent so that if the event is not for
the net device, ignore the event and return to avoid excessive
logging.

Change-Id: Icfb2f27f97712bf8e1422404a85163e801d43641
CRs-Fixed: 2335081
Rakshith Suresh Patkar 6 년 전
부모
커밋
4faeb2e806
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      core/hdd/src/wlan_hdd_nud_tracking.c

+ 4 - 0
core/hdd/src/wlan_hdd_nud_tracking.c

@@ -344,6 +344,10 @@ static void hdd_nud_filter_netevent(struct neighbour *neigh)
 		return;
 
 	adapter = hdd_get_adapter_by_macaddr(hdd_ctx, netdev->dev_addr);
+
+	if (!adapter)
+		return;
+
 	status = hdd_validate_adapter(adapter);
 	if (status)
 		return;