From: Kleber Sacilotto de Souza Date: Fri, 22 Feb 2013 19:14:52 +0000 (+0000) Subject: mlx4_en: fix allocation of CPU affinity reverse-map X-Git-Tag: v3.9-rc1~70^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3770699675dd1b8fc1e86ff369eb3cce44e10082;p=pandora-kernel.git mlx4_en: fix allocation of CPU affinity reverse-map The mlx4_en driver allocates the number of objects for the CPU affinity reverse-map based on the number of rx rings of the device. However, mlx4_assign_eq() calls irq_cpu_rmap_add() as many times as IRQ's are assigned to EQ's, which can be as large as mlx4_dev->caps.comp_pool. If caps.comp_pool is larger than rx_ring_num we will eventually hit the BUG_ON() in cpu_rmap_add(). Fix this problem by allocating space for the maximum number of CPU affinity reverse-map objects we might want to add. Signed-off-by: Kleber Sacilotto de Souza Acked-by: Amir Vadai Signed-off-by: David S. Miller --- Reading git-diff-tree failed