From patchwork Tue Jul 23 15:39:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 261102 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2710A2C00D9 for ; Wed, 24 Jul 2013 01:39:44 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932619Ab3GWPjl (ORCPT ); Tue, 23 Jul 2013 11:39:41 -0400 Received: from mms2.broadcom.com ([216.31.210.18]:4395 "EHLO mms2.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932138Ab3GWPjk (ORCPT ); Tue, 23 Jul 2013 11:39:40 -0400 Received: from [10.9.208.53] by mms2.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Tue, 23 Jul 2013 08:33:30 -0700 X-Server-Uuid: 4500596E-606A-40F9-852D-14843D8201B2 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.1.438.0; Tue, 23 Jul 2013 08:39:31 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.1.438.0; Tue, 23 Jul 2013 08:39:31 -0700 Received: from fainelli-desktop.broadcom.com ( dhcp-lab-brsb-10.bri.broadcom.com [10.178.7.10]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 7FBD9F2D72; Tue, 23 Jul 2013 08:39:30 -0700 (PDT) From: "Florian Fainelli" To: davem@davemloft.net cc: eric.dumazet@gmail.com, netdev@vger.kernel.org, "Florian Fainelli" Subject: [PATCH] net: fix comment above build_skb() Date: Tue, 23 Jul 2013 16:39:03 +0100 Message-ID: <1374593943-31642-1-git-send-email-f.fainelli@gmail.com> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 X-WSS-ID: 7DF07DC01R047105533-01-01 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org build_skb() specifies that the data parameter must come from a kmalloc'd area, this is only true if frag_size equals 0, because then build_skb() will use kzsize(data) to figure out the actual data size. Update the comment to reflect that special condition. Signed-off-by: Florian Fainelli --- net/core/skbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 20e02d2..d3174db 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -309,7 +309,8 @@ EXPORT_SYMBOL(__alloc_skb); * @frag_size: size of fragment, or 0 if head was kmalloced * * Allocate a new &sk_buff. Caller provides space holding head and - * skb_shared_info. @data must have been allocated by kmalloc() + * skb_shared_info. @data must have been allocated by kmalloc() only if + * @frag_size is 0. * The return is the new skb buffer. * On a failure the return is %NULL, and @data is not freed. * Notes :