aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@googlemail.com>2008-11-15 05:00:17 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-16 02:25:36 -0500
commitd1f1e9c01006b4b050e090055c75278f80c2a5c5 (patch)
tree958114312b76246a54235811fd858a407540fd00 /arch
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')
-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,
384 384
385 spin_lock(&ds_lock); 385 spin_lock(&ds_lock);
386 386
387 error = -EPERM;
387 if (!check_tracer(task)) 388 if (!check_tracer(task))
388 return -EPERM; 389 goto out_unlock;
389 390
390 error = -ENOMEM; 391 error = -ENOMEM;
391 context = ds_alloc_context(task); 392 context = ds_alloc_context(task);