On 02/01/2012 01:53 PM, Christopher Yeoh wrote:> + mm = mm_access(task, PTRACE_MODE_ATTACH);> + if (!mm || IS_ERR(mm)) {> + if (!mm)> + rc = -EINVAL;> + else> + rc = -EPERM;> goto put_task_struct;If IS_ERR(mm), you need to return PTR_ERR(mm), rather than -EPERM.And, is -EINVAL proper for !mm case? For me, -ENOENT is better.