]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Check for error in mlx5_attach_interface
authorHuy Nguyen <huyn@mellanox.com>
Wed, 15 Aug 2018 16:08:48 +0000 (11:08 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 6 Sep 2018 00:08:33 +0000 (17:08 -0700)
commit69f24ab32f8477064476e7ddb9b16313dfecda91
treec82f421f7b4c0cbff185923bf032af2d034c4176
parentd08bc4b1a0d2042ec9b96c99fb4de6b3906c5f7d
net/mlx5: Check for error in mlx5_attach_interface

Currently, mlx5_attach_interface does not check for error
after calling intf->attach or intf->add. When these two calls
fails, the client is not initialized and will cause issues such as
kernel panic on invalid address in the teardown path (mlx5_detach_interface)

Fixes: 947fab68fe97 ("net/mlx5: Introduce attach/detach to interface API")
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/dev.c