Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8444d00 authored by Stephane Eranian's avatar Stephane Eranian Committed by Tony Luck
Browse files

[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: default avatarstephane eranian <eranian@hpl.hp.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent e9f7bee1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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));