diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2013-07-23 15:22:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-24 20:59:07 -0400 |
commit | deceb4c062a8dd63fe554c3be2b4bf9151a5cedf (patch) | |
tree | 1baebeda655b4bcfcb36f9da9c038932f84b7404 /net | |
parent | 2bf420a7686e0fdd2fbf16d75e729b306744db0d (diff) |
net: fix comment above build_skb()
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 <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/skbuff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 20e02d2605ec..3df4d4ccf440 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -309,7 +309,8 @@ EXPORT_SYMBOL(__alloc_skb); | |||
309 | * @frag_size: size of fragment, or 0 if head was kmalloced | 309 | * @frag_size: size of fragment, or 0 if head was kmalloced |
310 | * | 310 | * |
311 | * Allocate a new &sk_buff. Caller provides space holding head and | 311 | * Allocate a new &sk_buff. Caller provides space holding head and |
312 | * skb_shared_info. @data must have been allocated by kmalloc() | 312 | * skb_shared_info. @data must have been allocated by kmalloc() only if |
313 | * @frag_size is 0, otherwise data should come from the page allocator. | ||
313 | * The return is the new skb buffer. | 314 | * The return is the new skb buffer. |
314 | * On a failure the return is %NULL, and @data is not freed. | 315 | * On a failure the return is %NULL, and @data is not freed. |
315 | * Notes : | 316 | * Notes : |