]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix null pointer access when setting MTU of vport representor
authorAdi Nissim <adin@mellanox.com>
Tue, 5 Jun 2018 08:32:11 +0000 (11:32 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 31 Jul 2018 19:58:44 +0000 (12:58 -0700)
commitc18b5cd049fb0c5b4e246e81069f96a6b270d82d
treeaac70cbaea8af662d931939de31ab6c0670da010
parent3b0fad78da838617b245514052bd41ec615fbc53
net/mlx5e: Fix null pointer access when setting MTU of vport representor

MTU helper function is used by both conventional mlx5e
instances (PF/VF) and the eswitch representors. The representor
shouldn't change the nic vport context MTU, the VF is responsible for
that. Therefore set_mtu_cb has a null value when changing the
representor MTU.

Fixes: 10cf553ea706 ("net/mlx5e: Support configurable MTU for vport representors")
Signed-off-by: Adi Nissim <adin@mellanox.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c