summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/kgdb.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-29 01:33:37 +0100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-29 01:33:37 +0100
commitdfd0436ad0ce139467b124c646fa65ee2635e14a (patch)
treeabf9d83c704417cdd484243c12aeffee6b185aba /arch/powerpc/kernel/kgdb.c
parentpowerpc: Rename set_break to avoid naming conflict (diff)
parentpowerpc: Max next_tb to prevent from replaying timer interrupt (diff)
downloadlinux-dfd0436ad0ce139467b124c646fa65ee2635e14a.tar.xz
linux-dfd0436ad0ce139467b124c646fa65ee2635e14a.zip
Merge branch 'merge' into next
Merge "merge" branch to bring in various bug fixes that are going into 3.8
Diffstat (limited to 'arch/powerpc/kernel/kgdb.c')
-rw-r--r--arch/powerpc/kernel/kgdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 8747447045b6..5ca82cd4a374 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -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()
@@ -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;
}