bus/vdev: replace device list lock by a recursive one
authorThomas Monjalon <thomas@monjalon.net>
Tue, 22 May 2018 11:28:17 +0000 (13:28 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 22 May 2018 14:33:48 +0000 (16:33 +0200)
commitf14b264f65043ae163285fd9089e9d1822d598b7
tree32cb7ff90cb50891066a0d482f6c97e1221cea12
parent3291abb5a2a5f24c109ab74e6aad0545927333a7
bus/vdev: replace device list lock by a recursive one

A device like failsafe can manage sub-devices.
When removing such device, it removes its sub-devices
and try to take the same vdev_device_list_lock.
It was causing a deadlock because the lock was not recursive.

Fixes: 35f462839b69 ("bus/vdev: add lock on device list")

Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Matan Azrad <matan@mellanox.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
drivers/bus/vdev/vdev.c