net/mlx5: fix existing file removal
authorXueming Li <xuemingl@mellanox.com>
Fri, 16 Mar 2018 15:22:27 +0000 (23:22 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:44 +0000 (14:08 +0200)
commitbe939f60f42673eaa99609ea2c9f876e29320eff
tree73cb2960ad5b49329e2615e5d365e14813b07c9d
parenta170a30d22a8c34c36541d0dd6bcc2fcc4c9ee2f
net/mlx5: fix existing file removal

There is no guarantee that the file won't be removed by external
user/application between the stat() and remove() syscalls, remove() will
fail if the file no longer exists.

Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_socket.c