kgdb,arm: fix register dump
DBG_MAX_REG_NUM incorrectly had the number of indices in the GDB regs array rather than the number of registers, leading to an oops when the "rd" command is used in KDB. Cc: stable@kernel.org Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
This commit is contained in:

committed by
Jason Wessel

szülő
931ea24819
commit
834b2964b7
@@ -79,7 +79,7 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task)
|
||||
return;
|
||||
|
||||
/* Initialize to zero */
|
||||
for (regno = 0; regno < DBG_MAX_REG_NUM; regno++)
|
||||
for (regno = 0; regno < GDB_MAX_REGS; regno++)
|
||||
gdb_regs[regno] = 0;
|
||||
|
||||
/* Otherwise, we have only some registers from switch_to() */
|
||||
|
Reference in New Issue
Block a user