Re: [PATCH 1/2] irq_flags_t: intro and core annotations

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff Garzik
Date: Monday, October 22, 2007 - 1:47 pm

Andrew Morton wrote:





Let me add to the chorus of voices:  I continually see two cases where 
real bugs crop up:

1) hacker uses spin_lock_irq() in incorrect context (where it is not 
safe to do a blind enable/disable)

2) hacker uses spin_lock_irq() correctly, but the surrounding code 
changes, thus invalidating prior assumptions.

I would even go so far as to support the drastic measure of deleting 
spin_lock_irq().

spin_lock_irqsave() generates fewer bugs, is more future-proof, and by 
virtue of 'flags' permits architectures a bit more flexibility.

	Jeff



-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] irq_flags_t: intro and core annotations, Alexey Dobriyan, (Sat Oct 20, 4:55 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Alexey Dobriyan, (Sun Oct 21, 2:30 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Ralf Baechle, (Mon Oct 22, 8:29 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Andrew Morton, (Mon Oct 22, 11:21 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Geert Uytterhoeven, (Mon Oct 22, 11:50 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Arnd Bergmann, (Mon Oct 22, 12:10 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Matthew Wilcox, (Mon Oct 22, 12:47 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Linus Torvalds, (Mon Oct 22, 12:56 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Andrew Morton, (Mon Oct 22, 1:02 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Jeff Garzik, (Mon Oct 22, 1:47 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Arnd Bergmann, (Mon Oct 22, 2:34 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Thomas Gleixner, (Mon Oct 22, 2:46 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, David Miller, (Mon Oct 22, 5:21 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Arnd Bergmann, (Mon Oct 22, 6:06 pm)
USB HCD: avoid duplicate local_irq_disable(), Arnd Bergmann, (Mon Oct 22, 6:28 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Arnd Bergmann, (Wed Oct 24, 1:55 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Jan Engelhardt, (Thu Oct 25, 8:40 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Roman Zippel, (Sat Oct 27, 12:20 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Alexey Dobriyan, (Sat Oct 27, 1:14 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Alexey Dobriyan, (Sat Oct 27, 1:24 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Jan Engelhardt, (Sat Oct 27, 1:32 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Peter Zijlstra, (Sat Oct 27, 2:07 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Roman Zippel, (Sat Oct 27, 2:22 pm)