提交 4e8d3889 编写于 作者: C Chiqijun 提交者: Yang Yingliang

net/hinic: Fix signed integer overflow

driver inclusion
category: bugfix
bugzilla: 4472

-----------------------------------------------------------------------

Use u16 for cons_idx and delta in struct hinic_rxq, or we'll meet a
overflow when a large number of packets are received.
Signed-off-by: NChiqijun <chiqijun@huawei.com>
Reviewed-by: NZengweiliang <zengweiliang.zengweiliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 6166fe13
...@@ -75,8 +75,8 @@ struct hinic_rxq { ...@@ -75,8 +75,8 @@ struct hinic_rxq {
u32 dma_rx_buff_size; u32 dma_rx_buff_size;
struct hinic_rxq_stats rxq_stats; struct hinic_rxq_stats rxq_stats;
int cons_idx; u16 cons_idx;
int delta; u16 delta;
u32 irq_id; u32 irq_id;
u16 msix_entry_idx; u16 msix_entry_idx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册