提交 39174291 编写于 作者: F françois romieu 提交者: David S. Miller

r8169: fix kasan reported skb use-after-free.

Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
Reported-by: NDave Jones <davej@codemonkey.org.uk>
Fixes: d7d2d89d ("r8169: Add software counter for multicast packages")
Acked-by: NEric Dumazet <edumazet@google.com>
Acked-by: NCorinna Vinschen <vinschen@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c5a37883
......@@ -7429,15 +7429,15 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
rtl8169_rx_vlan_tag(desc, skb);
if (skb->pkt_type == PACKET_MULTICAST)
dev->stats.multicast++;
napi_gro_receive(&tp->napi, skb);
u64_stats_update_begin(&tp->rx_stats.syncp);
tp->rx_stats.packets++;
tp->rx_stats.bytes += pkt_size;
u64_stats_update_end(&tp->rx_stats.syncp);
if (skb->pkt_type == PACKET_MULTICAST)
dev->stats.multicast++;
}
release_descriptor:
desc->opts2 = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册