Skip to content
Commit c64e9710 authored by Chengchang Tang's avatar Chengchang Tang Committed by Leon Romanovsky
Browse files

RDMA/hns: Fix uninitialized ucmd in hns_roce_create_qp_common()

ucmd in hns_roce_create_qp_common() are not initialized. But it works fine
until new member sdb_addr is added to struct hns_roce_ib_create_qp.

If the user-mode driver uses an old version ABI, then the value of the new
member will be undefined after ib_copy_from_udata().

This patch fixes it by initialize this variable to 0. And the default value
of the new member sdb_addr will be 0 which is invalid.

Fixes: 0425e3e6

 ("RDMA/hns: Support flush cqe for hip08 in kernel space")
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20231017125239.164455-3-huangjunxian6@hisilicon.com
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 9faef73e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment