diff --git a/net/core/dev.c b/net/core/dev.c
index c624a04dad1fbbd8ea7ad0055b2d47d11c6caa1b..8f8931b93140e15db2b9a530d9b28dd94b6f7cd1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4057,8 +4057,10 @@ static u32 netif_receive_generic_xdp(struct sk_buff *skb,
 	 * pckt.
 	 */
 	off = orig_data_end - xdp.data_end;
-	if (off != 0)
+	if (off != 0) {
 		skb_set_tail_pointer(skb, xdp.data_end - xdp.data);
+		skb->len -= off;
+	}
 
 	switch (act) {
 	case XDP_REDIRECT: