Skip to content
Commit 52b2abef authored by Qiao Ma's avatar Qiao Ma Committed by Jakub Kicinski
Browse files

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: 7dd29ee1 ("hinic: add sriov feature support")
Signed-off-by: default avatarQiao Ma <mqaio@linux.alibaba.com>
Reviewed-by: default avatarXunlei Pang <xlpang@linux.alibaba.com>
Link: https://lore.kernel.org/r/282817b0e1ae2e28fdf3ed8271a04e77f57bf42e.1651148587.git.mqaio@linux.alibaba.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e87f66b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment