Parcourir la source

qcacmn: fix invalid net_dev fetched from gro queue skb

  Dp_rx_vdev_detach() will flush all gro skb to make sure the
net_dev stored in skb is valid before this vdev is down, but
dp_rx_vdev_detach() is only invoked at the end of function
dp_vdev_detach_wifi3(). for some case, if there is still dp_peer
pending when execute dp_vdev_detach_wifi3(), dp_rx_vdev_detach()
won't be invoked.
  Move dp_rx_vdev_detach() before pending peer detection in
dp_vdev_detach_wifi3() so that gro queue skb flushing can be
executed each time.

Change-Id: I0feea5b77de7efab884c0e5822c8671119892f7d
CRs-fixed: 2649385
Jinwei Chen il y a 5 ans
Parent
commit
248f7bd35a
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  1. 1 2
      dp/wifi3.0/dp_main.c

+ 1 - 2
dp/wifi3.0/dp_main.c

@@ -5480,6 +5480,7 @@ static QDF_STATUS dp_vdev_detach_wifi3(struct cdp_soc_t *cdp_soc,
 	else if (hif_get_target_status(soc->hif_handle) == TARGET_STATUS_RESET)
 		dp_vdev_flush_peers((struct cdp_vdev *)vdev, true);
 
+	dp_rx_vdev_detach(vdev);
 	/*
 	 * Use peer_ref_mutex while accessing peer_list, in case
 	 * a peer is in the process of being removed from the list.
@@ -5531,8 +5532,6 @@ static QDF_STATUS dp_vdev_detach_wifi3(struct cdp_soc_t *cdp_soc,
 	qdf_spin_unlock_bh(&pdev->vdev_list_lock);
 
 	dp_tx_vdev_detach(vdev);
-	dp_rx_vdev_detach(vdev);
-
 free_vdev:
 	if (wlan_op_mode_monitor == vdev->opmode) {
 		if (soc->intr_mode == DP_INTR_POLL)