Commit 404f8244 authored by Laura Abbott's avatar Laura Abbott
Browse files

gpu: ion: Add scan for leaked userspace fds



The ION_IOC_MAP/ION_IOC_SHARE ioctls take a reference to
an ion buffer. If the fd generated by the ioctl is never
closed, the buffer will never be freed. This is a pain to
track down in userspace. Add a debugfs entry to do a scan
of all the buffers and check which ones have no handle
associated with them. If a buffer has no handle associated
with it, that means the last reference is an fd. There
isn't a good way to directly associate an fd with a buffer,
but this can at least be a starting point for tracking down
leaks.

Change-Id: I64eedd6a30d8298b2aa75532c7fad506542910f6
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent 8747bbe3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment