]> err.no Git - linux-2.6/blobdiff - kernel/ptrace.c
[POWERPC] 85xx: Add quirk to ignore bogus FPGA on CDS
[linux-2.6] / kernel / ptrace.c
index 1653d35419a1cdd60aae7af2b592254fcc125273..82a558b655dabb9dc7990aedc804b9b04d8f1525 100644 (file)
@@ -142,7 +142,7 @@ static int may_attach(struct task_struct *task)
                return -EPERM;
        smp_rmb();
        if (task->mm)
-               dumpable = task->mm->dumpable;
+               dumpable = get_dumpable(task->mm);
        if (!dumpable && !capable(CAP_SYS_PTRACE))
                return -EPERM;
 
@@ -501,3 +501,11 @@ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
                return -EIO;
        return put_user(tmp, (unsigned long __user *)data);
 }
+
+int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
+{
+       int copied;
+
+       copied = access_process_vm(tsk, addr, &data, sizeof(data), 1);
+       return (copied == sizeof(data)) ? 0 : -EIO;
+}