mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
net: fix sk_forward_alloc corruption
On UDP sockets, we must call skb_free_datagram() with socket locked, or risk sk_forward_alloc corruption. This requirement is not respected in SUNRPC. Add a convenient helper, skb_free_datagram_locked() and use it in SUNRPC Reported-by: Francis Moreau <francis.moro@gmail.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
63ca2d74ea
commit
9d410c7960
5 changed files with 18 additions and 12 deletions
|
@ -1757,6 +1757,8 @@ extern int skb_copy_datagram_const_iovec(const struct sk_buff *from,
|
|||
int to_offset,
|
||||
int size);
|
||||
extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
|
||||
extern void skb_free_datagram_locked(struct sock *sk,
|
||||
struct sk_buff *skb);
|
||||
extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb,
|
||||
unsigned int flags);
|
||||
extern __wsum skb_checksum(const struct sk_buff *skb, int offset,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue