]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/ptrace.c
powerpc/hw_brk: Fix setting of length for exact mode breakpoints
[karo-tx-linux.git] / arch / powerpc / kernel / ptrace.c
index 98c2fc198712aabe3f90055e24d653df604be78e..64f7bd5b1b0f59bcf23fa47c22eb012a5a440b16 100644 (file)
@@ -1449,7 +1449,9 @@ static long ppc_set_hwdebug(struct task_struct *child,
         */
        if (bp_info->addr_mode == PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE) {
                len = bp_info->addr2 - bp_info->addr;
-       } else if (bp_info->addr_mode != PPC_BREAKPOINT_MODE_EXACT) {
+       } else if (bp_info->addr_mode == PPC_BREAKPOINT_MODE_EXACT)
+               len = 1;
+       else {
                ptrace_put_breakpoints(child);
                return -EINVAL;
        }