Patch "net/mlx4_core: Fix wrong index in propagating port change event to VFs" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net/mlx4_core: Fix wrong index in propagating port change event to VFs
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-mlx4_core-fix-wrong-index-in-propagating-port-change-event-to-vfs.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sat Sep 26 11:13:07 PDT 2015
From: Jack Morgenstein <[email protected]>
Date: Wed, 22 Jul 2015 16:53:47 +0300
Subject: net/mlx4_core: Fix wrong index in propagating port change event to VFs
From: Jack Morgenstein <[email protected]>
[ Upstream commit 1c1bf34951e8d17941bf708d1901c47e81b15d55 ]
The port-change event processing in procedure mlx4_eq_int() uses "slave" as the vf_oper array index. Since the value of "slave" is the PF function index, the result is that the PF link state is used for deciding to propagate the event for all the VFs. The VF link state should be used, so the VF function index should be used here.
--- drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx4/eq.c +2 -2
@@ -573,7 +573,7 @@ static int mlx4_eq_int(struct mlx4_dev *continue ;mlx4_dbg (dev,"%s: Sending MLX4_PORT_CHANGE_SUBTYPE_DOWN to slave: %d, port:%d\n" , __func__, i, port); - s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state; + s_info = &priv->mfunc.master.vf_oper[i].vport[port].state;if (IFLA_VF_LINK_STATE_AUTO == s_info->link_state) { eqe->event.port_change.port = cpu_to_be32(
@@ -608,7 +608,7 @@ static int mlx4_eq_int(struct mlx4_dev *continue ;if (i ==mlx4_master_func_num (dev))continue ; - s_info = &priv->mfunc.master.vf_oper[slave].vport[port].state; + s_info = &priv->mfunc.master.vf_oper[i].vport[port].state;if (IFLA_VF_LINK_STATE_AUTO == s_info->link_state) { eqe->event.port_change.port = cpu_to_be32(
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/ib-mlx4-fix-potential-deadlock-when-sending-mad-to-wire.patch queue-4.1/net-mlx4_core-fix-wrong-index-in-propagating-port-change-event-to-vfs.patch queue-4.1/ib-mlx4-forbid-using-sysfs-to-change-roce-pkeys.patch