]> 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)
commit8ec7f65b6f5588eb6885e83d733618b3a7feedef
treec82f421f7b4c0cbff185923bf032af2d034c4176
parent21f4c944c034050a082260cb4c4888c312857362
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: 31fd6119192c ("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