From patchwork Thu Apr 16 19:58:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Hartkopp X-Patchwork-Id: 26090 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id D6B3AB6F44 for ; Fri, 17 Apr 2009 05:58:42 +1000 (EST) Received: by ozlabs.org (Postfix) id C8871DE1AC; Fri, 17 Apr 2009 05:58:42 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 6ACC5DE1A5 for ; Fri, 17 Apr 2009 05:58:42 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757264AbZDPT6f (ORCPT ); Thu, 16 Apr 2009 15:58:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757057AbZDPT6e (ORCPT ); Thu, 16 Apr 2009 15:58:34 -0400 Received: from mo-p00-ob.rzone.de ([81.169.146.161]:52796 "EHLO mo-p00-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756609AbZDPT6d (ORCPT ); Thu, 16 Apr 2009 15:58:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1239911909; l=1343; s=domk; d=hartkopp.net; h=Content-Type:Subject:CC:To:MIME-Version:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=MC81Z7A+pt1lu4X1s7/qNajHBmpC4Q9RrNR/MwxwnOY=; b=vgFw/yzTqCUtiY38WqbdDAZorWmzleY7VBEtEa8GHSBk22PzK73uUpliKENb4hSrsA6 ohuxVn37i1Tinv2iGAP3cA1pW8mArgZ8kMSom+OwtFYMPUkN166FVDHbs0UUzi/H1gyrm x5UBkHRq9izZz4tK1qe/96IRda9PVyf5XPY= X-RZG-AUTH: :I2ANY0W6W/eA95XfH/xfO6gOxLxTty/udEMngcJ/VAKW226lDNJVyuUOJzI2ONQ= X-RZG-CLASS-ID: mo00 Received: from [192.168.11.10] (p5B22DF50.dip.t-dialin.net [91.34.223.80]) by post.strato.de (klopstock mo17) (RZmta 18.28) with ESMTP id w04627l3GJTWtE ; Thu, 16 Apr 2009 21:58:26 +0200 (MEST) Message-ID: <49E78DE5.10104@hartkopp.net> Date: Thu, 16 Apr 2009 21:58:29 +0200 From: Oliver Hartkopp User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: David Miller , Neil Horman CC: Linux Netdev List Subject: [PATCH 2.6.30] Network Drop Monitor: Make use of consume_skb() in af_can.c X-Enigmail-Version: 0.95.7 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Since commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 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 diff --git a/net/can/af_can.c b/net/can/af_can.c index 547bafc..10f0528 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -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++;