aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorJunxian Huang <huangjunxian4@hisilicon.com>2021-08-25 17:43:10 +0800
committerJason Gunthorpe <jgg@nvidia.com>2021-08-25 13:55:29 -0300
commit4303e61264c45cb535255c5b76400f5c4ab1305d (patch)
tree9cb6a634bc2fcccccb0cfab48c8feb8276033eb4 /drivers/infiniband/hw
parentRDMA/hns: Fix incorrect lsn field (diff)
downloadlinux-dev-4303e61264c45cb535255c5b76400f5c4ab1305d.tar.xz
linux-dev-4303e61264c45cb535255c5b76400f5c4ab1305d.zip
RDMA/hns: Bugfix for data type of dip_idx
dip_idx is associated with qp_num whose data type is u32. However, dip_idx is incorrectly defined as u8 data in the hns_roce_dip struct, which leads to data truncation during value assignment. Fixes: f91696f2f053 ("RDMA/hns: Support congestion control type selection according to the FW") Link: https://lore.kernel.org/r/1629884592-23424-2-git-send-email-liangwenpeng@huawei.com Signed-off-by: Junxian Huang <huangjunxian4@hisilicon.com> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
index 54c1223d63d8..0b91a1a57aa0 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
@@ -1441,7 +1441,7 @@ struct hns_roce_v2_priv {
struct hns_roce_dip {
u8 dgid[GID_LEN_V2];
- u8 dip_idx;
+ u32 dip_idx;
struct list_head node; /* all dips are on a list */
};