summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSean Hefty <sean.hefty@intel.com>2007-03-05 21:50:17 +0100
committerRoland Dreier <rolandd@cisco.com>2007-03-06 21:41:44 +0100
commitcb164b8c6a2bdf995c938e5f157d41465b18e5c3 (patch)
tree4e06a744dcbc32d16ac0c4fa8508d6bdb2acfd20 /drivers/infiniband
parentRDMA/cxgb3: Don't use mm after it's freed in iwch_mmap() (diff)
downloadlinux-cb164b8c6a2bdf995c938e5f157d41465b18e5c3.tar.xz
linux-cb164b8c6a2bdf995c938e5f157d41465b18e5c3.zip
RDMA/cma: Initialize rdma_bind_list in cma_alloc_any_port()
The struct rdma_bind_list fields for hlist are not being initialized, resulting in a corrupted list. Fix this by using kzalloc() to make sure all pointers are NULL. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/cma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index d441815a3e0c..fde92ce45153 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1821,7 +1821,7 @@ static int cma_alloc_port(struct idr *ps, struct rdma_id_private *id_priv,
struct rdma_bind_list *bind_list;
int port, ret;
- bind_list = kmalloc(sizeof *bind_list, GFP_KERNEL);
+ bind_list = kzalloc(sizeof *bind_list, GFP_KERNEL);
if (!bind_list)
return -ENOMEM;