int err = 0;
 
                /* serialises with execbuf */
-               RCU_INIT_POINTER(ce->gem_context, NULL);
+               set_bit(CONTEXT_CLOSED_BIT, &ce->flags);
                if (!intel_context_pin_if_active(ce))
                        continue;
 
 
        prev = __i915_request_commit(rq);
 
        /* Check that the context wasn't destroyed before submission */
-       if (likely(rcu_access_pointer(eb->context->gem_context))) {
+       if (likely(!intel_context_is_closed(eb->context))) {
                attr = eb->gem_context->sched;
 
                /*
 
 {
        int err;
 
+       GEM_BUG_ON(intel_context_is_closed(ce));
+
        if (unlikely(!test_bit(CONTEXT_ALLOC_BIT, &ce->flags))) {
                err = intel_context_alloc_state(ce);
                if (err)
 
        return test_bit(CONTEXT_BARRIER_BIT, &ce->flags);
 }
 
+static inline bool intel_context_is_closed(const struct intel_context *ce)
+{
+       return test_bit(CONTEXT_CLOSED_BIT, &ce->flags);
+}
+
 static inline bool intel_context_use_semaphores(const struct intel_context *ce)
 {
        return test_bit(CONTEXT_USE_SEMAPHORES, &ce->flags);
 
 #define CONTEXT_BARRIER_BIT            0
 #define CONTEXT_ALLOC_BIT              1
 #define CONTEXT_VALID_BIT              2
-#define CONTEXT_USE_SEMAPHORES         3
-#define CONTEXT_BANNED                 4
-#define CONTEXT_FORCE_SINGLE_SUBMISSION        5
-#define CONTEXT_NOPREEMPT              6
+#define CONTEXT_CLOSED_BIT             3
+#define CONTEXT_USE_SEMAPHORES         4
+#define CONTEXT_BANNED                 5
+#define CONTEXT_FORCE_SINGLE_SUBMISSION        6
+#define CONTEXT_NOPREEMPT              7
 
        u32 *lrc_reg_state;
        u64 lrc_desc;