Skip to content

Commit 71ab832

Browse files
mokomullsuryasaimadhu
authored andcommitted
x86/kgdb: Return 0 from kgdb_arch_set_breakpoint()
err must be nonzero in order to reach text_poke(), which caused kgdb to fail to set breakpoints: (gdb) break __x64_sys_sync Breakpoint 1 at 0xffffffff81288910: file ../fs/sync.c, line 124. (gdb) c Continuing. Warning: Cannot insert breakpoint 1. Cannot access memory at address 0xffffffff81288910 Command aborted. Fixes: 86a2205 ("x86/kgdb: Avoid redundant comparison of patched code") Signed-off-by: Matt Mullins <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Nadav Amit <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Daniel Thompson <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: "Gustavo A. R. Silva" <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "Peter Zijlstra (Intel)" <[email protected]> Cc: Rick Edgecombe <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: x86-ml <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent c7563e6 commit 71ab832

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/kgdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
758758
BREAK_INSTR_SIZE);
759759
bpt->type = BP_POKE_BREAKPOINT;
760760

761-
return err;
761+
return 0;
762762
}
763763

764764
int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)

0 commit comments

Comments
 (0)