summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-11-25 11:09:36 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-11-25 13:28:34 -0800
commitee3ce191e8eaa4cc15c51a28b34143b36404c4f5 (patch)
tree557c5ade9b92e91f095e4017d97ffe7afd83383f /kernel
parent5e66b0b5f187c811419ff10cfb5668c028a64d57 (diff)
downloadblackbird-op-linux-ee3ce191e8eaa4cc15c51a28b34143b36404c4f5.tar.gz
blackbird-op-linux-ee3ce191e8eaa4cc15c51a28b34143b36404c4f5.zip
[PATCH] Enforce "unsigned long flags;" when spinlocking
Make it break or warn if you pass to spin_lock_irqsave() and friends something different from "unsigned long flags;". Suprisingly large amount of these was caught by recent commit c53421b18f205c5f97c604ae55c6a921f034b0f6 and others. Idea is largely from FRV typechecking. Suggestions from Andrew Morton. All stupid typos in first version fixed. Passes allmodconfig on i386, x86_64, alpha, arm as well as my usual config. Note #1: checking with sparse is still needed, because a driver can save and pass around flags or something. So far patch is very intrusive. Note #2: techically, we should break only if sizeof(flags) < sizeof(unsigned long), however, the more pain for getting suspicious code into kernel, the better. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud