OSDN Git Service

RDMA/hns: Fix init resp when alloc ucontext
authorYixian Liu <liuyixian@huawei.com>
Mon, 19 Mar 2018 13:36:07 +0000 (21:36 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 19 Mar 2018 17:41:41 +0000 (11:41 -0600)
commitdf7e40425813c50cd252e6f5e348a81ef1acae56
tree530543104e02673f36b535e31ecec762e912bf0a
parentb19744e965abed7ad0167c25097f405b88ce5d13
RDMA/hns: Fix init resp when alloc ucontext

The data in resp will be copied from kernel to userspace, thus it needs to
be initialized to zeros to avoid copying uninited stack memory.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: e088a685eae9 ("RDMA/hns: Support rq record doorbell for the user space")
Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_main.c