[Intel-gfx] [CI 2/3] drm/i915/selftests: Flush fput after running selftests
Chris Wilson
chris at chris-wilson.co.uk
Wed Nov 27 22:32:51 UTC 2019
Use an rcu_barrier() to flush any mock files used by the selftests as
the deferred cleanup may be holding resources that we need to cleanup.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/selftests/i915_selftest.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_selftest.c b/drivers/gpu/drm/i915/selftests/i915_selftest.c
index d3bf9eefb682..036e30b8b62d 100644
--- a/drivers/gpu/drm/i915/selftests/i915_selftest.c
+++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c
@@ -152,8 +152,10 @@ static int __run_selftests(const char *name,
continue;
cond_resched();
- if (signal_pending(current))
- return -EINTR;
+ if (signal_pending(current)) {
+ err = -EINTR;
+ goto out;
+ }
pr_info(DRIVER_NAME ": Running %s\n", st->name);
if (data)
@@ -171,6 +173,8 @@ static int __run_selftests(const char *name,
st->name, err))
err = -1;
+out:
+ rcu_barrier(); /* flush deferred fput() */
return err;
}
--
2.24.0
More information about the Intel-gfx
mailing list