From: Miaohe Lin
Date: Sat, 15 Aug 2020 04:46:41 -0400
> pskb_carve_frag_list() may return -ENOMEM in pskb_carve_inside_nonlinear().
> we should handle this correctly or we would get wrong sk_buff.
>
> Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function")
> Signed-off-by: Miaohe
David Miller wrote:
>> David Miller wrote:
+ /* 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))
From: linmiaohe
Date: Mon, 17 Aug 2020 02:27:23 +
> David Miller wrote:
>>> + /* 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.
>>> */
>>> +
David Miller wrote:
>> +/* 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))
>> +
From: Miaohe Lin
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
pskb_carve_frag_list() may return -ENOMEM in pskb_carve_inside_nonlinear().
we should handle this correctly or we would get wrong sk_buff.
Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function")
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 10 +++---
1 file changed, 7
6 matches
Mail list logo