Skip to content

Commit

Permalink
!12787 net: hisilicon: Fix potential use-after-free in hisi_femac_rx()
Browse files Browse the repository at this point in the history
Merge Pull Request from: @ci-robot 
 
PR sync from: Liu Jian <liujian56@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/JZH72T4PZCYAGJRLBAA2JTZ6ZHOSBK27/ 
 
https://gitee.com/src-openeuler/kernel/issues/IAYRFL 
 
Link:https://gitee.com/openeuler/kernel/pulls/12787 

Reviewed-by: Yue Haibing <yuehaibing@huawei.com> 
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
  • Loading branch information
openeuler-ci-bot authored and gitee-org committed Nov 3, 2024
2 parents 96c769f + 0063a95 commit 76317ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/hisilicon/hisi_femac.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static int hisi_femac_rx(struct net_device *dev, int limit)
skb->protocol = eth_type_trans(skb, dev);
napi_gro_receive(&priv->napi, skb);
dev->stats.rx_packets++;
dev->stats.rx_bytes += skb->len;
dev->stats.rx_bytes += len;
next:
pos = (pos + 1) % rxq->num;
if (rx_pkts_num >= limit)
Expand Down

0 comments on commit 76317ae

Please sign in to comment.