Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348917
b: refs/heads/master
c: edea0d0
h: refs/heads/master
i:
  348915: 8748273
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jan 20, 2013
1 parent 9e18524 commit 51fcd69
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 30 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: 5da1f88b8b727dc3a66c52d4513e871be6d43d19
refs/heads/master: edea0d03ee5f0ae0051b6adb6681ebdf976b1ca4
27 changes: 0 additions & 27 deletions trunk/arch/ia64/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,33 +672,6 @@ ptrace_attach_sync_user_rbs (struct task_struct *child)
read_unlock(&tasklist_lock);
}

static inline int
thread_matches (struct task_struct *thread, unsigned long addr)
{
unsigned long thread_rbs_end;
struct pt_regs *thread_regs;

if (ptrace_check_attach(thread, 0) < 0)
/*
* If the thread is not in an attachable state, we'll
* ignore it. The net effect is that if ADDR happens
* to overlap with the portion of the thread's
* register backing store that is currently residing
* on the thread's kernel stack, then ptrace() may end
* up accessing a stale value. But if the thread
* isn't stopped, that's a problem anyhow, so we're
* doing as well as we can...
*/
return 0;

thread_regs = task_pt_regs(thread);
thread_rbs_end = ia64_get_user_rbs_end(thread, thread_regs, NULL);
if (!on_kernel_rbs(addr, thread_regs->ar_bspstore, thread_rbs_end))
return 0;

return 1; /* looks like we've got a winner */
}

/*
* Write f32-f127 back to task->thread.fph if it has been modified.
*/
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ extern long arch_ptrace(struct task_struct *child, long request,
extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
extern void ptrace_disable(struct task_struct *);
extern int ptrace_check_attach(struct task_struct *task, bool ignore_state);
extern int ptrace_request(struct task_struct *child, long request,
unsigned long addr, unsigned long data);
extern void ptrace_notify(int exit_code);
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void __ptrace_unlink(struct task_struct *child)
* RETURNS:
* 0 on success, -ESRCH if %child is not ready.
*/
int ptrace_check_attach(struct task_struct *child, bool ignore_state)
static int ptrace_check_attach(struct task_struct *child, bool ignore_state)
{
int ret = -ESRCH;

Expand Down

0 comments on commit 51fcd69

Please sign in to comment.