]> git.karo-electronics.de Git - karo-tx-linux.git/commit
IB/mthca: Fix buddy->num_free allocation size
authorRoland Dreier <roland@purestorage.com>
Thu, 6 Oct 2011 16:33:18 +0000 (09:33 -0700)
committerRoland Dreier <roland@purestorage.com>
Thu, 6 Oct 2011 16:33:18 +0000 (09:33 -0700)
commitee47f2e395a0a143b39028a3b5e386eb64897c18
tree5537212199420f2a75f2d3f67cdc37df01305a2f
parent976d167615b64e14bc1491ca51d424e2ba9a5e84
IB/mthca: Fix buddy->num_free allocation size

The num_free field of mthca_buddy has a type of array of unsigned int
while it was allocated as an array of pointers.  On 64-bit platforms
this allocates twice more than required.  Fix this by allocating the
correct size for the type.

This is the same bug just fixed in mlx4 by Eli Cohen <eli@mellanox.co.il>.

Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mthca/mthca_mr.c