mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 11:53:53 +00:00
alua_bus_detach() might be running concurrently with alua_rtpg_work(), so we might trip over h->sdev == NULL and call BUG_ON(). The correct way of handling it is to not set h->sdev to NULL in alua_bus_detach(), and call rcu_synchronize() before the final delete to ensure that all concurrent threads have left the critical section. Then we can get rid of the BUG_ON() and replace it with a simple if condition. Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Cc: Brian Bunker <[email protected]> Acked-by: Brian Bunker <[email protected]> Tested-by: Jitendra Khasdev <[email protected]> Reviewed-by: Jitendra Khasdev <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>