diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-11-29 04:47:27 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-12-05 11:48:25 +0100 |
commit | 2d4c38494e43d647c4ba68c098c5592d7068f25d (patch) | |
tree | 3c66ca076760ac10eeeb54dac95f4e9093839190 /src/device.c | |
parent | 3be7e2f42612c69bdc59e7f633d43a2f3f293978 (diff) |
device: prepare skb_list_walk_safe for upstreaming
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c index 532d399..e888ac3 100644 --- a/src/device.c +++ b/src/device.c @@ -171,8 +171,8 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev) dev_kfree_skb(skb); skb = segs; } - do { - next = skb->next; + + skb_list_walk_safe(skb, skb, next) { skb_mark_not_on_list(skb); skb = skb_share_check(skb, GFP_ATOMIC); @@ -187,7 +187,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev) PACKET_CB(skb)->mtu = mtu; __skb_queue_tail(&packets, skb); - } while ((skb = next) != NULL); + } spin_lock_bh(&peer->staged_packet_queue.lock); /* If the queue is getting too big, we start removing the oldest packets |