public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/kgdb: return 0 from kgdb_arch_set_breakpoint
@ 2019-05-31 19:47 Matt Mullins
  2019-05-31 19:51 ` Nadav Amit
  2019-06-12 17:01 ` [tip:x86/urgent] x86/kgdb: Return 0 from kgdb_arch_set_breakpoint() tip-bot for Matt Mullins
  0 siblings, 2 replies; 3+ messages in thread
From: Matt Mullins @ 2019-05-31 19:47 UTC (permalink / raw)
  To: mmullins, bp, mingo, luto, namit, peterz
  Cc: Thomas Gleixner, H. Peter Anvin, x86, Daniel Thompson,
	Rick Edgecombe, Christophe Leroy, Douglas Anderson, linux-kernel

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: 86a22057127d ("x86/kgdb: Avoid redundant comparison of patched code")
Signed-off-by: Matt Mullins <mmullins@fb.com>
---
 arch/x86/kernel/kgdb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
index 9a8c1648fc9a..6690c5652aeb 100644
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -758,7 +758,7 @@ int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
 		       BREAK_INSTR_SIZE);
 	bpt->type = BP_POKE_BREAKPOINT;
 
-	return err;
+	return 0;
 }
 
 int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-12 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-31 19:47 [PATCH] x86/kgdb: return 0 from kgdb_arch_set_breakpoint Matt Mullins
2019-05-31 19:51 ` Nadav Amit
2019-06-12 17:01 ` [tip:x86/urgent] x86/kgdb: Return 0 from kgdb_arch_set_breakpoint() tip-bot for Matt Mullins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox