diff options
author | Dotan Barak <dotanb@dev.mellanox.co.il> | 2007-07-15 08:00:09 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-17 21:37:38 -0400 |
commit | 8fcea95a2a15444d5cc4bee174bb12233aa0a2aa (patch) | |
tree | cd8d9a0218866a0172ee9e3e1ac85520d1438fe4 /drivers/infiniband/hw | |
parent | 1c27cb71aa7d86df0271caadfcc196a0518f5e33 (diff) |
IB/mlx4: Take sizeof the correct pointer in call to memset()
When clearing the ib_ah_attr parameter in to_ib_ah_attr(), use sizeof
*ib_ah_attr instead of sizeof *path. This is the same bug as was
fixed for mthca in 99d4f22e ("IB/mthca: Use correct structure size in
call to memset()"), but the code was cut and pasted into mlx4 before the
fix was merged.
Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index d10bd888e7c3..0793059b753a 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1498,7 +1498,7 @@ static int to_ib_qp_access_flags(int mlx4_flags) | |||
1498 | static void to_ib_ah_attr(struct mlx4_dev *dev, struct ib_ah_attr *ib_ah_attr, | 1498 | static void to_ib_ah_attr(struct mlx4_dev *dev, struct ib_ah_attr *ib_ah_attr, |
1499 | struct mlx4_qp_path *path) | 1499 | struct mlx4_qp_path *path) |
1500 | { | 1500 | { |
1501 | memset(ib_ah_attr, 0, sizeof *path); | 1501 | memset(ib_ah_attr, 0, sizeof *ib_ah_attr); |
1502 | ib_ah_attr->port_num = path->sched_queue & 0x40 ? 2 : 1; | 1502 | ib_ah_attr->port_num = path->sched_queue & 0x40 ? 2 : 1; |
1503 | 1503 | ||
1504 | if (ib_ah_attr->port_num == 0 || ib_ah_attr->port_num > dev->caps.num_ports) | 1504 | if (ib_ah_attr->port_num == 0 || ib_ah_attr->port_num > dev->caps.num_ports) |