diff options
Diffstat (limited to 'include/linux/rcuwait.h')
-rw-r--r-- | include/linux/rcuwait.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/include/linux/rcuwait.h b/include/linux/rcuwait.h index 563290fc194f..75c97e4bbc57 100644 --- a/include/linux/rcuwait.h +++ b/include/linux/rcuwait.h | |||
@@ -6,16 +6,11 @@ | |||
6 | 6 | ||
7 | /* | 7 | /* |
8 | * rcuwait provides a way of blocking and waking up a single | 8 | * rcuwait provides a way of blocking and waking up a single |
9 | * task in an rcu-safe manner; where it is forbidden to use | 9 | * task in an rcu-safe manner. |
10 | * after exit_notify(). task_struct is not properly rcu protected, | ||
11 | * unless dealing with rcu-aware lists, ie: find_task_by_*(). | ||
12 | * | 10 | * |
13 | * Alternatively we have task_rcu_dereference(), but the return | 11 | * The only time @task is non-nil is when a user is blocked (or |
14 | * semantics have different implications which would break the | 12 | * checking if it needs to) on a condition, and reset as soon as we |
15 | * wakeup side. The only time @task is non-nil is when a user is | 13 | * know that the condition has succeeded and are awoken. |
16 | * blocked (or checking if it needs to) on a condition, and reset | ||
17 | * as soon as we know that the condition has succeeded and are | ||
18 | * awoken. | ||
19 | */ | 14 | */ |
20 | struct rcuwait { | 15 | struct rcuwait { |
21 | struct task_struct __rcu *task; | 16 | struct task_struct __rcu *task; |
@@ -37,13 +32,6 @@ extern void rcuwait_wake_up(struct rcuwait *w); | |||
37 | */ | 32 | */ |
38 | #define rcuwait_wait_event(w, condition) \ | 33 | #define rcuwait_wait_event(w, condition) \ |
39 | ({ \ | 34 | ({ \ |
40 | /* \ | ||
41 | * Complain if we are called after do_exit()/exit_notify(), \ | ||
42 | * as we cannot rely on the rcu critical region for the \ | ||
43 | * wakeup side. \ | ||
44 | */ \ | ||
45 | WARN_ON(current->exit_state); \ | ||
46 | \ | ||
47 | rcu_assign_pointer((w)->task, current); \ | 35 | rcu_assign_pointer((w)->task, current); \ |
48 | for (;;) { \ | 36 | for (;;) { \ |
49 | /* \ | 37 | /* \ |