Commit deceb4c0 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2bf420a7
...@@ -309,7 +309,8 @@ EXPORT_SYMBOL(__alloc_skb); ...@@ -309,7 +309,8 @@ EXPORT_SYMBOL(__alloc_skb);
* @frag_size: size of fragment, or 0 if head was kmalloced * @frag_size: size of fragment, or 0 if head was kmalloced
* *
* Allocate a new &sk_buff. Caller provides space holding head and * 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, otherwise data should come from the page allocator.
* The return is the new skb buffer. * The return is the new skb buffer.
* On a failure the return is %NULL, and @data is not freed. * On a failure the return is %NULL, and @data is not freed.
* Notes : * Notes :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment