Skip to content

Commit

Permalink
IB/ucm: Initialize sgid request GID attribute pointer
Browse files Browse the repository at this point in the history
sgid_attr is uninitialized on the stack, initialize it to NULL.

Fixes: 3983910 ("IB/cm: Replace members of sa_path_rec with 'struct sgid_attr *'")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Yossi Itigin <yosefe@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Parav Pandit authored and Jason Gunthorpe committed Aug 7, 2018
1 parent 7601097 commit 58796e6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/infiniband/core/ucm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,14 +1000,11 @@ static ssize_t ib_ucm_send_sidr_req(struct ib_ucm_file *file,
const char __user *inbuf,
int in_len, int out_len)
{
struct ib_cm_sidr_req_param param;
struct ib_cm_sidr_req_param param = {};
struct ib_ucm_context *ctx;
struct ib_ucm_sidr_req cmd;
int result;

param.private_data = NULL;
param.path = NULL;

if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;

Expand Down

0 comments on commit 58796e6

Please sign in to comment.