Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349326
b: refs/heads/master
c: fefd9e6
h: refs/heads/master
v: v3
  • Loading branch information
Cong Ding authored and Benjamin Herrenschmidt committed Jan 28, 2013
1 parent f2ed67f commit 03523cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 572177d7c77db1981ba2563e01478126482c43bc
refs/heads/master: fefd9e6f8860249b2c284d89cb2e51fa71a9503a
5 changes: 3 additions & 2 deletions trunk/arch/powerpc/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs)
static int kgdb_singlestep(struct pt_regs *regs)
{
struct thread_info *thread_info, *exception_thread_info;
struct thread_info *backup_current_thread_info = \
(struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL);
struct thread_info *backup_current_thread_info;

if (user_mode(regs))
return 0;

backup_current_thread_info = (struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL);
/*
* On Book E and perhaps other processors, singlestep is handled on
* the critical exception stack. This causes current_thread_info()
Expand All @@ -185,6 +185,7 @@ static int kgdb_singlestep(struct pt_regs *regs)
/* Restore current_thread_info lastly. */
memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info);

kfree(backup_current_thread_info);
return 1;
}

Expand Down

0 comments on commit 03523cd

Please sign in to comment.