diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-17 04:19:06 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-17 05:20:32 -0400 |
commit | 5b6c7b08196ea160f78a9afc1948091dc930b108 (patch) | |
tree | 0ed2341e1721e8b4c7ed37fffe8dfc82f281c463 /include/linux/interrupt.h | |
parent | d6434af22679ec15d7779f3f41a5d3aebbb704e3 (diff) |
net: Make [dis/en]able_irq_*_lockdep() RT safe
The lockdep irqoff protection which is used to prevent lockdep false
positives leads to "scheduling while atomic" and "might sleep" bug
floods.
Make the irq disabling depend on !RT.
Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r-- | include/linux/interrupt.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 9f6580a184c9..d363196eb108 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -246,7 +246,7 @@ static inline int irq_select_affinity(unsigned int irq) { return 0; } | |||
246 | static inline void disable_irq_nosync_lockdep(unsigned int irq) | 246 | static inline void disable_irq_nosync_lockdep(unsigned int irq) |
247 | { | 247 | { |
248 | disable_irq_nosync(irq); | 248 | disable_irq_nosync(irq); |
249 | #ifdef CONFIG_LOCKDEP | 249 | #if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT) |
250 | local_irq_disable(); | 250 | local_irq_disable(); |
251 | #endif | 251 | #endif |
252 | } | 252 | } |
@@ -254,7 +254,7 @@ static inline void disable_irq_nosync_lockdep(unsigned int irq) | |||
254 | static inline void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags) | 254 | static inline void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags) |
255 | { | 255 | { |
256 | disable_irq_nosync(irq); | 256 | disable_irq_nosync(irq); |
257 | #ifdef CONFIG_LOCKDEP | 257 | #if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT) |
258 | local_irq_save(*flags); | 258 | local_irq_save(*flags); |
259 | #endif | 259 | #endif |
260 | } | 260 | } |
@@ -262,14 +262,14 @@ static inline void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned | |||
262 | static inline void disable_irq_lockdep(unsigned int irq) | 262 | static inline void disable_irq_lockdep(unsigned int irq) |
263 | { | 263 | { |
264 | disable_irq(irq); | 264 | disable_irq(irq); |
265 | #ifdef CONFIG_LOCKDEP | 265 | #if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT) |
266 | local_irq_disable(); | 266 | local_irq_disable(); |
267 | #endif | 267 | #endif |
268 | } | 268 | } |
269 | 269 | ||
270 | static inline void enable_irq_lockdep(unsigned int irq) | 270 | static inline void enable_irq_lockdep(unsigned int irq) |
271 | { | 271 | { |
272 | #ifdef CONFIG_LOCKDEP | 272 | #if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT) |
273 | local_irq_enable(); | 273 | local_irq_enable(); |
274 | #endif | 274 | #endif |
275 | enable_irq(irq); | 275 | enable_irq(irq); |
@@ -277,7 +277,7 @@ static inline void enable_irq_lockdep(unsigned int irq) | |||
277 | 277 | ||
278 | static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags) | 278 | static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags) |
279 | { | 279 | { |
280 | #ifdef CONFIG_LOCKDEP | 280 | #if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT) |
281 | local_irq_restore(*flags); | 281 | local_irq_restore(*flags); |
282 | #endif | 282 | #endif |
283 | enable_irq(irq); | 283 | enable_irq(irq); |