add a helper function to test if an object is on the stack
authorFUJITA Tomonori <[email protected]>
Thu, 24 Jul 2008 04:26:53 +0000 (21:26 -0700)
committerLinus Torvalds <[email protected]>
Thu, 24 Jul 2008 17:47:14 +0000 (10:47 -0700)
commit8b05c7e6e159d2f33c9275281b8b909a89eb7c5d
tree646edb14c42d6404e36f1602d47c639c72a8300a
parent68ad8df42e12037c3894c9706ab428bf5cd6426b
add a helper function to test if an object is on the stack

lib/debugobjects.c has a function to test if an object is on the stack.
The block layer and ide needs it (they need to avoid DMA from/to stack
buffers).  This patch moves the function to include/linux/sched.h so that
everyone can use it.

lib/debugobjects.c uses current->stack but this patch uses a
task_stack_page() accessor, which is a preferable way to access the stack.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/sched.h
lib/debugobjects.c