r8169: fix kasan reported skb use-after-free.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Reported-by: Dave Jones <davej@codemonkey.org.uk>
Fixes: d7d2d89d4b
("r8169: Add software counter for multicast packages")
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Corinna Vinschen <vinschen@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c5a37883f4
commit
39174291d8
|
@ -7429,15 +7429,15 @@ process_pkt:
|
||||||
|
|
||||||
rtl8169_rx_vlan_tag(desc, skb);
|
rtl8169_rx_vlan_tag(desc, skb);
|
||||||
|
|
||||||
|
if (skb->pkt_type == PACKET_MULTICAST)
|
||||||
|
dev->stats.multicast++;
|
||||||
|
|
||||||
napi_gro_receive(&tp->napi, skb);
|
napi_gro_receive(&tp->napi, skb);
|
||||||
|
|
||||||
u64_stats_update_begin(&tp->rx_stats.syncp);
|
u64_stats_update_begin(&tp->rx_stats.syncp);
|
||||||
tp->rx_stats.packets++;
|
tp->rx_stats.packets++;
|
||||||
tp->rx_stats.bytes += pkt_size;
|
tp->rx_stats.bytes += pkt_size;
|
||||||
u64_stats_update_end(&tp->rx_stats.syncp);
|
u64_stats_update_end(&tp->rx_stats.syncp);
|
||||||
|
|
||||||
if (skb->pkt_type == PACKET_MULTICAST)
|
|
||||||
dev->stats.multicast++;
|
|
||||||
}
|
}
|
||||||
release_descriptor:
|
release_descriptor:
|
||||||
desc->opts2 = 0;
|
desc->opts2 = 0;
|
||||||
|
|
Loading…
Reference in New Issue