Ver Fonte

qcacld-3.0: Fix check_after_deref(REVERSE_INULL) issue

In __hdd_hard_start_xmit, Null-checking for skb under drop_pkt
suggests that it may be null, but it has already been dereferenced
on all paths.

Remove this Null-check for skb under drop_pkt as skb cannot be NULL.

Change-Id: I6c8e816652951a95cff26b26c48b8f39a096b095
CRs-Fixed: 2259256
Alok Kumar há 6 anos atrás
pai
commit
2d35a9e331
1 ficheiros alterados com 9 adições e 11 exclusões
  1. 9 11
      core/hdd/src/wlan_hdd_tx_rx.c

+ 9 - 11
core/hdd/src/wlan_hdd_tx_rx.c

@@ -1126,17 +1126,15 @@ drop_pkt_and_release_skb:
 	qdf_net_buf_debug_release_skb(skb);
 drop_pkt:
 
-	if (skb) {
-		/* track connectivity stats */
-		if (adapter->pkt_type_bitmap)
-			hdd_tx_rx_collect_connectivity_stats_info(skb, adapter,
-						PKT_TYPE_TX_DROPPED, &pkt_type);
-		qdf_dp_trace_data_pkt(skb, QDF_TRACE_DEFAULT_PDEV_ID,
-				      QDF_DP_TRACE_DROP_PACKET_RECORD, 0,
-				      QDF_TX);
-		kfree_skb(skb);
-		skb = NULL;
-	}
+	/* track connectivity stats */
+	if (adapter->pkt_type_bitmap)
+		hdd_tx_rx_collect_connectivity_stats_info(skb, adapter,
+							  PKT_TYPE_TX_DROPPED,
+							  &pkt_type);
+	qdf_dp_trace_data_pkt(skb, QDF_TRACE_DEFAULT_PDEV_ID,
+			      QDF_DP_TRACE_DROP_PACKET_RECORD, 0,
+			      QDF_TX);
+	kfree_skb(skb);
 
 drop_pkt_accounting: