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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Linus Torvalds <torvalds@...>, Matthew Wilcox <matthew@...>, Arnd Bergmann <arnd@...>, Ralf Baechle <ralf@...>, Alexey Dobriyan <adobriyan@...>, Al Viro <viro@...>, <viro@...>, <linux-kernel@...>, <linux-arch@...>
Date: Monday, October 22, 2007 - 4: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, 7:55 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Roman Zippel, (Sat Oct 27, 3:20 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Alexey Dobriyan, (Sat Oct 27, 4:14 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Roman Zippel, (Sat Oct 27, 5:22 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Peter Zijlstra, (Sat Oct 27, 5:07 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Jan Engelhardt, (Thu Oct 25, 11:40 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Alexey Dobriyan, (Sat Oct 27, 4:24 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Jan Engelhardt, (Sat Oct 27, 4:32 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Alexey Dobriyan, (Sun Oct 21, 5:30 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Ralf Baechle, (Mon Oct 22, 11:29 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Andrew Morton, (Mon Oct 22, 2:21 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Arnd Bergmann, (Mon Oct 22, 3:10 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Matthew Wilcox, (Mon Oct 22, 3:47 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Linus Torvalds, (Mon Oct 22, 3:56 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Jeff Garzik, (Mon Oct 22, 4:47 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Jeff Garzik, (Tue Oct 23, 10:11 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Arnd Bergmann, (Wed Oct 24, 4:55 am)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, David Miller, (Mon Oct 22, 8:21 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Andrew Morton, (Mon Oct 22, 4:02 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Arnd Bergmann, (Mon Oct 22, 5:34 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Thomas Gleixner, (Mon Oct 22, 5:46 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Arnd Bergmann, (Mon Oct 22, 9:06 pm)
USB HCD: avoid duplicate local_irq_disable(), Arnd Bergmann, (Mon Oct 22, 9:28 pm)
Re: [PATCH 1/2] irq_flags_t: intro and core annotations, Geert Uytterhoeven, (Mon Oct 22, 2:50 pm)