Skip to content

Commit

Permalink
can: Network Drop Monitor: Make use of consume_skb() in af_can.c
Browse files Browse the repository at this point in the history
Since commit ead2ceb ("Network Drop
Monitor: Adding kfree_skb_clean for non-drops and modifying
end-of-line points for skbs") so called end-of-line points for skb's
should use consume_skb() to free the socket buffer.

In opposite to consume_skb() the function kfree_skb() is intended to
be used for unexpected skb drops e.g. in error conditions that now can
trigger the network drop monitor if enabled.

This patch moves the skb end-of-line point in af_can.c to use
consume_skb().

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Oliver Hartkopp authored and David S. Miller committed Apr 17, 2009
1 parent f72f550 commit 62bcaa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/can/af_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,8 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev,

rcu_read_unlock();

/* free the skbuff allocated by the netdevice driver */
kfree_skb(skb);
/* consume the skbuff allocated by the netdevice driver */
consume_skb(skb);

if (matches > 0) {
can_stats.matches++;
Expand Down

0 comments on commit 62bcaa1

Please sign in to comment.