提交 b8444d00 编写于 作者: S Stephane Eranian 提交者: Tony Luck

[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: Nstephane eranian <eranian@hpl.hp.com>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 e9f7bee1
......@@ -4936,13 +4936,15 @@ sys_perfmonctl (int fd, int cmd, void __user *arg, int count)
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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册