]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mlx4: Fix tx ring affinity_mask creation
authorBenjamin Poirier <bpoirier@suse.de>
Tue, 28 Apr 2015 21:49:29 +0000 (14:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 May 2015 12:34:02 +0000 (05:34 -0700)
commitcf9c7e58ec8325f198c5f441c1d139585efa1c44
tree60e7bc742507035363abeec37ea5dc012562e988
parent73c89f11f223fae23e94be1c38ecbbc97f68983d
mlx4: Fix tx ring affinity_mask creation

[ Upstream commit 42eab005a5dd5d7ea2b0328aecc4d6cc0c23c9c2 ]

By default, the number of tx queues is limited by the number of online cpus
in mlx4_en_get_profile(). However, this limit no longer holds after the
ethtool .set_channels method has been called. In that situation, the driver
may access invalid bits of certain cpumask variables when queue_index >=
nr_cpu_ids.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Acked-by: Ido Shamay <idos@mellanox.com>
Fixes: d03a68f ("net/mlx4_en: Configure the XPS queue mapping on driver load")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/en_tx.c