The current code requires num_possible_cpus() + 1 MSIX vectors. However, num_possible_cpus() stands for the max number of supported CPUs by the kernel. We should use num_online_cpus() which is the number of available CPUs for the system.
Signed-off-by: Eli Cohen <[email protected]> --- drivers/net/mlx4/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index e3e0d54..0559df4 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c @@ -969,7 +969,7 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev) if (msi_x) { nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, - num_possible_cpus() + 1); + num_online_cpus() + 1); entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL); if (!entries) goto no_msi; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
