summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/kgdb.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-29 04:33:37 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-29 04:33:37 +0400
commitdfd0436ad0ce139467b124c646fa65ee2635e14a (patch)
treeabf9d83c704417cdd484243c12aeffee6b185aba /arch/powerpc/kernel/kgdb.c
parentb9818c3312da66f4b83a4a2e8650628be1237cb5 (diff)
parent689dfa894c57842a05bf6dc9f97e6bb71ec5f386 (diff)
downloadlinux-dfd0436ad0ce139467b124c646fa65ee2635e14a.tar.xz
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;
}