Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105260
b: refs/heads/master
c: 8b05c7e
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Linus Torvalds committed Jul 24, 2008
1 parent bcb63fd commit 7702ba4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68ad8df42e12037c3894c9706ab428bf5cd6426b
refs/heads/master: 8b05c7e6e159d2f33c9275281b8b909a89eb7c5d
7 changes: 7 additions & 0 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -1983,6 +1983,13 @@ static inline unsigned long *end_of_stack(struct task_struct *p)

#endif

static inline int object_is_on_stack(void *obj)
{
void *stack = task_stack_page(current);

return (obj >= stack) && (obj < (stack + THREAD_SIZE));
}

extern void thread_info_cache_init(void);

/* set thread flags in other task's structures
Expand Down
4 changes: 1 addition & 3 deletions trunk/lib/debugobjects.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,13 @@ debug_object_fixup(int (*fixup)(void *addr, enum debug_obj_state state),

static void debug_object_is_on_stack(void *addr, int onstack)
{
void *stack = current->stack;
int is_on_stack;
static int limit;

if (limit > 4)
return;

is_on_stack = (addr >= stack && addr < (stack + THREAD_SIZE));

is_on_stack = object_is_on_stack(addr);
if (is_on_stack == onstack)
return;

Expand Down

0 comments on commit 7702ba4

Please sign in to comment.