mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04: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 <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
63ca2d74ea
commit
9d410c7960
5 changed files with 18 additions and 12 deletions
|
|
@ -999,9 +999,7 @@ try_again:
|
|||
err = ulen;
|
||||
|
||||
out_free:
|
||||
lock_sock(sk);
|
||||
skb_free_datagram(sk, skb);
|
||||
release_sock(sk);
|
||||
skb_free_datagram_locked(sk, skb);
|
||||
out:
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue