Skip to content

Commit

Permalink
Network Drop Monitor: Fix skb_kill_datagram
Browse files Browse the repository at this point in the history
Commit ead2ceb ("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.

Signed-off-by: John Dykstra <john.dykstra1@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
John Dykstra authored and David S. Miller committed May 8, 2009
1 parent 17cb400 commit 61de71c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/core/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 61de71c

Please sign in to comment.