tree efa54f2f19580f330ae71c3a9476d2261b172142
parent bc68552faad0e134eb22281343d5ae5a4873fa80
author [EMAIL PROTECTED] <[EMAIL PROTECTED]> Thu, 28 Jul 2005 19:18:00 -0700
committer Tony Luck <[EMAIL PROTECTED]> Thu, 11 Aug 2005 06:21:58 -0700

[IA64] fix perfmon context load

The PFM_LOAD_CONTEXT may fail silently and cause a session
to remain reserved even though it should not. This can happen
when the commands succeeds in reserving the session but fails
when it actually tries to attach to the load_pid. In that case,
the command has failed but will return 0. More importantly,
the session will remain reserved. This patch fixes the problem.

Signed-off-by: <[EMAIL PROTECTED]>
Signed-off-by: Tony Luck <[EMAIL PROTECTED]>

 arch/ia64/kernel/perfmon.c |    1 +
 1 files changed, 1 insertion(+)

diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -4312,6 +4312,7 @@ pfm_context_load(pfm_context_t *ctx, voi
        DPRINT(("before cmpxchg() old_ctx=%p new_ctx=%p\n",
                thread->pfm_context, ctx));
+       ret = -EBUSY;
        old = ia64_cmpxchg(acq, &thread->pfm_context, NULL, ctx, 
sizeof(pfm_context_t *));
        if (old != NULL) {
                DPRINT(("load_pid [%d] already has a context\n", 
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to