Эх сурвалжийг харах

qcacld-3.0: Fix an improper trial spin lock acquiring

Return value of __netif_tx_trylock should be checked immediately
after being invoked, any subsequenct actions designated to the
atomic context should be abandoned if trial acquiring of the
spin lock fails

Change-Id: I95504eed14c3e30d014aa1ccc23356a7df02fb00
CRs-Fixed: 2047246
wadesong 8 жил өмнө
parent
commit
ba6373eb7d

+ 3 - 4
core/hdd/src/wlan_hdd_tx_rx.c

@@ -1321,14 +1321,13 @@ static void wlan_hdd_update_txq_timestamp(struct net_device *dev)
 {
 	struct netdev_queue *txq;
 	int i;
-	bool unlock;
 
 	for (i = 0; i < NUM_TX_QUEUES; i++) {
 		txq = netdev_get_tx_queue(dev, i);
-		unlock = __netif_tx_trylock(txq);
-		txq_trans_update(txq);
-		if (unlock == true)
+		if (__netif_tx_trylock(txq)) {
+			txq_trans_update(txq);
 			__netif_tx_unlock(txq);
+		}
 	}
 }