IB/mlx5: use kvmalloc_array for mlx5_ib_wq
authorLi Dongyang <dongyang.li@anu.edu.au>
Wed, 16 Aug 2017 13:31:22 +0000 (23:31 +1000)
committerDoug Ledford <dledford@redhat.com>
Tue, 22 Aug 2017 20:48:23 +0000 (16:48 -0400)
commitb588300801f3502a7de5ca897af68019fbb3bc79
tree80edf89cc303d0ed997a5d4589a2cb4af6c2b430
parent7be05753ccc27ce056d45f06a50d150927a88ed7
IB/mlx5: use kvmalloc_array for mlx5_ib_wq

We observed multiple times on our Lustre OSS servers that when
the system memory is fragmented, kmalloc() in create_kernel_qp()
could fail order 4/5 allocations while we still have many free pages.

Switch to kvmalloc_array() to allow the operation to contine.

Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/qp.c
drivers/infiniband/hw/mlx5/srq.c