]> git.ipfire.org Git - people/arne_f/kernel.git/commit
net: handle the return value of pskb_carve_frag_list() correctly
authorMiaohe Lin <linmiaohe@huawei.com>
Sat, 15 Aug 2020 08:46:41 +0000 (04:46 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 08:46:33 +0000 (10:46 +0200)
commitc823c7f330bc3dca8731488d03490cc878aa3caf
tree780a0de36007c035790edf49568a0203c47c373b
parent9a81aa7adf2ecf5090a18e496b9e9b66f0e34a25
net: handle the return value of pskb_carve_frag_list() correctly

commit eabe861881a733fc84f286f4d5a1ffaddd4f526f upstream.

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 <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/skbuff.c