diff options
author | Nick Piggin <npiggin@suse.de> | 2008-09-10 13:37:17 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-11 09:44:21 +0200 |
commit | 3ee1afa308f2a38e5d1e2ad3752ad7abcf480da1 (patch) | |
tree | 914e0f3bbd32a387cf6095c6955369fa8da7ebf6 /include/linux/kernel.h | |
parent | c10d38dda1774ed4540380333cabd229eff37094 (diff) | |
download | blackbird-op-linux-3ee1afa308f2a38e5d1e2ad3752ad7abcf480da1.tar.gz blackbird-op-linux-3ee1afa308f2a38e5d1e2ad3752ad7abcf480da1.zip |
x86: some lock annotations for user copy paths, v2
- introduce might_fault()
- handle the atomic user copy paths correctly
[ mingo@elte.hu: move might_sleep() outside of in_atomic(). ]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 2651f805ba6d..e580ec095765 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -140,6 +140,15 @@ extern int _cond_resched(void); (__x < 0) ? -__x : __x; \ }) +#ifdef CONFIG_PROVE_LOCKING +void might_fault(void); +#else +static inline void might_fault(void) +{ + might_sleep(); +} +#endif + extern struct atomic_notifier_head panic_notifier_list; extern long (*panic_blink)(long time); NORET_TYPE void panic(const char * fmt, ...) |