diff options
author | Qiao Ma <mqaio@linux.alibaba.com> | 2022-04-28 20:30:16 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-04-29 18:37:45 -0700 |
commit | 52b2abef450a78e25d485ac61e32f4ce86a87701 (patch) | |
tree | a37f93ccb517d4da67f9b1c42bc635c5ced34617 /drivers/net/dsa | |
parent | e87f66b38e66dffdec9daa9f8f0eb044e9a62e3b (diff) | |
download | lwn-52b2abef450a78e25d485ac61e32f4ce86a87701.tar.gz lwn-52b2abef450a78e25d485ac61e32f4ce86a87701.zip |
hinic: fix bug of wq out of bound access
If wq has only one page, we need to check wqe rolling over page by
compare end_idx and curr_idx, and then copy wqe to shadow wqe to
avoid out of bound access.
This work has been done in hinic_get_wqe, but missed for hinic_read_wqe.
This patch fixes it, and removes unnecessary MASKED_WQE_IDX().
Fixes: 7dd29ee12865 ("hinic: add sriov feature support")
Signed-off-by: Qiao Ma <mqaio@linux.alibaba.com>
Reviewed-by: Xunlei Pang <xlpang@linux.alibaba.com>
Link: https://lore.kernel.org/r/282817b0e1ae2e28fdf3ed8271a04e77f57bf42e.1651148587.git.mqaio@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa')
0 files changed, 0 insertions, 0 deletions