mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
m32r: convert to generic sys_ptrace
Convert m32r to the generic sys_ptrace. The conversion requires an architecture hook after ptrace_attach which this patch adds. The hook will also be needed for a conersion of ia64 to the generic ptrace code. Thanks to Hirokazu Takata for fixing a bug in the first version of this code. Signed-off-by: Christoph Hellwig <[email protected]> Cc: Hirokazu Takata <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dab8f4963a
commit
0ac1555915
3 changed files with 17 additions and 40 deletions
|
|
@ -453,6 +453,10 @@ struct task_struct *ptrace_get_task_struct(pid_t pid)
|
|||
return child;
|
||||
}
|
||||
|
||||
#ifndef arch_ptrace_attach
|
||||
#define arch_ptrace_attach(child) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifndef __ARCH_SYS_PTRACE
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
|
|
@ -476,6 +480,12 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
|||
|
||||
if (request == PTRACE_ATTACH) {
|
||||
ret = ptrace_attach(child);
|
||||
/*
|
||||
* Some architectures need to do book-keeping after
|
||||
* a ptrace attach.
|
||||
*/
|
||||
if (!ret)
|
||||
arch_ptrace_attach(child);
|
||||
goto out_put_task_struct;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue