net/mlx5: fix crash when configure is not called
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Thu, 24 May 2018 14:36:49 +0000 (16:36 +0200)
committerShahaf Shuler <shahafs@mellanox.com>
Mon, 28 May 2018 05:50:38 +0000 (07:50 +0200)
commite89c15b6971e5040296dc69f8739dd629f56a4b2
treee33faab0b66b959fb6af5b3e7d32df55b0bc910e
parentf8ad40dc998cfaa5b08d97d813570ec6373dabcc
net/mlx5: fix crash when configure is not called

Although uncommon, applications may destroy a device immediately after
probing it without going through dev_configure() first.

This patch addresses a crash which occurs when mlx5_dev_close() calls
mlx5_mr_release() due to an uninitialized entry in the private structure.

Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5_ethdev.c