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

Commit 65d37086 authored by Mike Galbraith's avatar Mike Galbraith Committed by Ingo Molnar
Browse files

perfcounters: fix refcounting bug



don't kfree in use counters.

Running...

	while true; do perfstat -e 1 -c true; done

...on all cores for a while doesn't seem to be eating ram, and my oops
is gone.

Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent bb3f0b59
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1934,6 +1934,7 @@ __perf_counter_exit_task(struct task_struct *child,
		}
		}
	}
	}


	if (!child_counter->filp || !atomic_long_read(&child_counter->filp->f_count))
		kfree(child_counter);
		kfree(child_counter);
}
}