Skip to contentSkip to conversation

Network Drop Monitor: Fix skb_kill_datagram

PATCH Applied John Dykstra 3 participants 4 messages May 7, 2009 – May 8, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Network Drop Monitor: Fix skb_kill_datagram

Commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop Monitor:
Adding kfree_skb_clean for non-drops and modifying end-of-line points for skbs") established new conventions for identifying dropped packets.

Align skb_kill_datagram() with these conventions so that packets that get dropped just before the copy to userspace are properly tracked.

---
 net/core/datagram.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
net/core/datagram.c +3 -1
index 22ea437..e2a36f0 100644
@@ -260,7 +260,9 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)
 		spin_unlock_bh(&sk->sk_receive_queue.lock);
 	}
 
-	skb_free_datagram(sk, skb);
+	kfree_skb(skb);
+	sk_mem_reclaim_partial(sk);
+
 	return err;
 }
 
Signature · 1 line
1.5.4.3
maintainer
#1 lore raw

From: John Dykstra <[email protected]>
Date: Thu, 07 May 2009 21:25:54 +0000

Quoted 8 lines

Commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop Monitor:
Adding kfree_skb_clean for non-drops and modifying end-of-line points for skbs") established new conventions for identifying dropped packets.

Align skb_kill_datagram() with these conventions so that packets that get dropped just before the copy to userspace are properly tracked.

Neil, ACK?

Acked-by
#2 lore raw
Quoted 7 lines · David Miller

From: John Dykstra <[email protected]>
Date: Thu, 07 May 2009 21:25:54 +0000

Quoted 4 lines

Commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop Monitor:
Adding kfree_skb_clean for non-drops and modifying end-of-line points for skbs") established new conventions for identifying dropped packets.

Quoted 7 lines
Quoted 4 lines

Align skb_kill_datagram() with these conventions so that packets that get dropped just before the copy to userspace are properly tracked.

Neil, ACK?

Yes, I think it looks good, thank you Jonh, Dave!

maintainer Applied
#3 lore raw

From: Neil Horman <[email protected]>
Date: Thu, 7 May 2009 20:42:00 -0400

Quoted 11 lines · David Miller
Quoted 10 lines

From: John Dykstra <[email protected]>
Date: Thu, 07 May 2009 21:25:54 +0000

Quoted 7 lines

Commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop Monitor:
Adding kfree_skb_clean for non-drops and modifying end-of-line points for skbs") established new conventions for identifying dropped packets.

Align skb_kill_datagram() with these conventions so that packets that get dropped just before the copy to userspace are properly tracked.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Neil, ACK?

Yes, I think it looks good, thank you Jonh, Dave!

Applied, thanks everyone.