summaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@googlemail.com>2008-11-15 11:00:17 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-16 08:25:36 +0100
commitd1f1e9c01006b4b050e090055c75278f80c2a5c5 (patch)
tree958114312b76246a54235811fd858a407540fd00 /arch/x86/kernel
parent6cd10f8db385ba547811baa5b26f672fdff232e6 (diff)
x86, bts: fix unlock problem in ds.c
Fix a problem where ds_request() returned an error without releasing the ds lock. Reported-by: Stephane Eranian <eranian@gmail.com> Signed-off-by: Markus Metzger <markus.t.metzger@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/ds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index 2b69994fd3a8..ac1d5b0586ba 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -384,8 +384,9 @@ static int ds_request(struct task_struct *task, void *base, size_t size,
spin_lock(&ds_lock);
+ error = -EPERM;
if (!check_tracer(task))
- return -EPERM;
+ goto out_unlock;
error = -ENOMEM;
context = ds_alloc_context(task);