Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbd5898d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by David S. Miller
Browse files

Phonet: fix accounting race between gprs_writeable() and gprs_xmit()



In the unlikely event that gprs_writeable() and gprs_xmit() check for
writeability at the same, we could stop the device queue forever.

Signed-off-by: default avatarRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c930a662
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -212,8 +212,9 @@ static int gprs_xmit(struct sk_buff *skb, struct net_device *dev)
		dev->stats.tx_bytes += len;
	}

	if (!pep_writeable(sk))
	netif_stop_queue(dev);
	if (pep_writeable(sk))
		netif_wake_queue(dev);
	return 0;
}