[PATCH] driver core: wait for srcu callbacks in device_links_purge
From: Michael Auchter
Date: Wed Oct 28 2020 - 16:43:04 EST
Suggested-by: Saravana Kannan <saravanak@xxxxxxxxxx>
Signed-off-by: Michael Auchter <michael.auchter@xxxxxx>
---
drivers/base/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index f90e9f77bf8c..e131cc2e7083 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1399,6 +1399,8 @@ static void device_links_purge(struct device *dev)
}
device_links_write_unlock();
+
+ srcu_barrier(&device_links_srcu);
}
static u32 fw_devlink_flags = DL_FLAG_SYNC_STATE_ONLY;
--
2.25.4