Skip to content

Commit

Permalink
x86, bts: fix unlock problem in ds.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Metzger authored and Ingo Molnar committed Nov 16, 2008
1 parent 6cd10f8 commit d1f1e9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/kernel/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d1f1e9c

Please sign in to comment.