ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL
[linux-2.6-microblaze.git] / kernel / async.c
index 9d31183..a1d585c 100644 (file)
@@ -196,6 +196,9 @@ static async_cookie_t __async_schedule(async_func_ptr *ptr, void *data, struct a
        atomic_inc(&entry_count);
        spin_unlock_irqrestore(&async_lock, flags);
 
+       /* mark that this task has queued an async job, used by module init */
+       current->flags |= PF_USED_ASYNC;
+
        /* schedule for execution */
        queue_work(system_unbound_wq, &entry->work);