Thread (3 messages) flat view 3 messages, 2 authors, 2020-08-18

Re: [PATCH] net: handle the return value of pskb_carve_frag_list() correctly

From: David Miller <davem@davemloft.net>
Date: 2020-08-16 23:01:25
Also in: lkml

From: Miaohe Lin <linmiaohe@huawei.com>
Date: Sat, 15 Aug 2020 04:46:41 -0400
+	/* split line is in frag list */
+	if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) {
+		/* skb_frag_unref() is not needed here as shinfo->nr_frags = 0. */
+		if (skb_has_frag_list(skb))
+			kfree_skb_list(skb_shinfo(skb)->frag_list);
+		kfree(data);
+		return -ENOMEM;
On error, the caller is going to kfree_skb(skb) which will take care of the
frag list.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help