mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-09-19 13:14:21 +00:00
net: fix sk_forward_alloc corruption
[ Upstream commit: 9d410c796067686b1e032d54ce475b7055537138 ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fb97d3d0b3
commit
5213d268cc
@@ -1761,6 +1761,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,
|
||||
|
||||
Reference in New Issue
Block a user