OSDN Git Service

net/mlx5: Avoid dereferencing uninitialized pointer
authorTalat Batheesh <talatb@mellanox.com>
Tue, 28 Mar 2017 13:13:41 +0000 (16:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 May 2017 15:36:35 +0000 (08:36 -0700)
commit501299e643814d2367aeeae8439129f0facc4183
tree584269a26d8ccd95c735b069e15885d0a2d4315b
parent0ea3c235779ac1eb132ba15e754995090e18a26b
net/mlx5: Avoid dereferencing uninitialized pointer

[ Upstream commit e497ec680c4cd51e76bfcdd49363d9ab8d32a757 ]

In NETDEV_CHANGEUPPER event the upper_info field is valid
only when linking is true. Otherwise it should be ignored.

Fixes: 7907f23adc18 (net/mlx5: Implement RoCE LAG feature)
Signed-off-by: Talat Batheesh <talatb@mellanox.com>
Reviewed-by: Aviv Heller <avivh@mellanox.com>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/lag.c