kernel_samsung_a53x/drivers/infiniband/hw/hns
Chengchang Tang 699351e192 RDMA/hns: Fix signed-unsigned mixed comparisons
[ Upstream commit b5f9efff101b06fd06a5e280a2b00b1335f5f476 ]

The ib_mtu_enum_to_int() and uverbs_attr_get_len() may returns a negative
value. In this case, mixed comparisons of signed and unsigned types will
throw wrong results.

This patch adds judgement for this situation.

Fixes: 30b707886aeb ("RDMA/hns: Support inline data in extented sge space for RC")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20231017125239.164455-4-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 11:43:03 +01:00
..
hns_roce_ah.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_alloc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_cmd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_cmd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_cq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_db.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_hem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_hem.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_hw_v1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_hw_v1.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_hw_v2.c RDMA/hns: Fix signed-unsigned mixed comparisons 2024-11-18 11:43:03 +01:00
hns_roce_hw_v2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_hw_v2_dfx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_mr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_pd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_qp.c RDMA/hns: Fix uninitialized ucmd in hns_roce_create_qp_common() 2024-11-18 11:43:03 +01:00
hns_roce_restrack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hns_roce_srq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00