mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 04:59:05 -04:00
net: add function to allocate sk_buff head without data area
Add a function to allocate a sk_buff head without any data. This will be used by memory mapped netlink to attach data from the mmaped area to the skb. Additionally change skb_release_all() to check whether the skb has a data area to allow the skb destructor to clear the data pointer in case only a head has been allocated. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e32123e598
commit
0ebd0ac5ff
2 changed files with 35 additions and 1 deletions
|
|
@ -651,6 +651,12 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
|
|||
return __alloc_skb(size, priority, SKB_ALLOC_FCLONE, NUMA_NO_NODE);
|
||||
}
|
||||
|
||||
extern struct sk_buff *__alloc_skb_head(gfp_t priority, int node);
|
||||
static inline struct sk_buff *alloc_skb_head(gfp_t priority)
|
||||
{
|
||||
return __alloc_skb_head(priority, -1);
|
||||
}
|
||||
|
||||
extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
|
||||
extern int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask);
|
||||
extern struct sk_buff *skb_clone(struct sk_buff *skb,
|
||||
|
|
|
|||
Loading…
Reference in a new issue