diff options
author | Chengchang Tang <tangchengchang@huawei.com> | 2023-10-17 20:52:35 +0800 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-10-19 09:49:40 +0300 |
commit | b5f9efff101b06fd06a5e280a2b00b1335f5f476 (patch) | |
tree | 2dc81841c92b957df295932c5390c09fa8b1aed9 /net/unix/af_unix.c | |
parent | c64e9710f9241e38a1c761ed1c1a30854784da66 (diff) |
RDMA/hns: Fix signed-unsigned mixed comparisons
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>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions