diff options
author | Stephane Eranian <eranian@hpl.hp.com> | 2006-08-25 23:00:19 +0200 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-09-08 19:59:14 +0200 |
commit | b8444d00762703e1b6146fce12ce2684885f8bf6 (patch) | |
tree | ea29e11313f63d9cc6aea0c2fd0179e9e3184a2a | |
parent | [PATCH] NFS: large non-page-aligned direct I/O clobbers memory (diff) | |
download | linux-b8444d00762703e1b6146fce12ce2684885f8bf6.tar.xz linux-b8444d00762703e1b6146fce12ce2684885f8bf6.zip |
[IA64] correct file descriptor reference counting in perfmon
Fix a bug in sys_perfmonctl() whereby it was not correctly
decrementing the file descriptor reference count.
Signed-off-by: stephane eranian <eranian@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index c7ccd6ee1ddf..84a7e52f56f6 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -4936,13 +4936,15 @@ abort_locked: if (likely(ctx)) { DPRINT(("context unlocked\n")); UNPROTECT_CTX(ctx, flags); - fput(file); } /* copy argument back to user, if needed */ if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; error_args: + if (file) + fput(file); + kfree(args_k); DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); |