]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:37:58 +0000 (08:37 +0200)
commit571f1f6862bf8dfdffe2e833089122a75a19a7b8
treed57c9e9a447f8c4fdd0ebbed893de65ab1f7b0c8
parent5ff9c51cbd66e53b70ce50c6ff59908e54576f51
net/mlx5: Check for error in mlx5_attach_interface

[ Upstream commit 47bc94b82291e007da61ee1b3d18c77871f3e158 ]

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: 737a234bb638 ("net/mlx5: Introduce attach/detach to interface API")
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/dev.c