Commit 3cbcab99 authored by Benjamin LaHaise's avatar Benjamin LaHaise Committed by David S. Miller

[NET]: Make sure nr_frags is accurate on paged SKB allocation failure.

parent 3b9683d4
...@@ -806,6 +806,7 @@ struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len, ...@@ -806,6 +806,7 @@ struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
page = alloc_pages(sk->allocation, 0); page = alloc_pages(sk->allocation, 0);
if (!page) { if (!page) {
err = -ENOBUFS; err = -ENOBUFS;
skb_shinfo(skb)->nr_frags = i;
kfree_skb(skb); kfree_skb(skb);
goto failure; goto failure;
} }
......
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