Currently, the ebb_set function for writing to the EBB regset returns ENODATA when ebb is active in the thread, and copies in the data when it is inactive. This patch inverts the condition so that it matches ebb_get and ebb_active. --- arch/powerpc/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index d23cf632edf0..6618570c6d56 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c @@ -1701,7 +1701,7 @@ static int ebb_set(struct task_struct *target, if (!cpu_has_feature(CPU_FTR_ARCH_207S)) return -ENODEV; - if (target->thread.used_ebb) + if (!target->thread.used_ebb) return -ENODATA; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, -- 2.13.6