summaryrefslogtreecommitdiff
path: root/tools/perf/scripts
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-12-13 14:24:59 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-14 08:57:18 -0800
commit83271f6262c91a49df325c52bec8f00f4de294ca (patch)
treebc132098212311b09a6c581d13b03d7ad26a6295 /tools/perf/scripts
parent687258f7c89107154ed8d7967e0ad47e0f6f679f (diff)
ion: hold reference to handle after ion_uhandle_get
commit 1262ab1846cf76f7549c66ef709120dbfbe6d49f (ion: replace userspace handle cookies with idr) broke the locking in ion. The ION_IOC_FREE and ION_IOC_MAP ioctls were relying on ion_handle_validate to detect the case where a call raced with another ION_IOC_FREE which may have freed the struct ion_handle. Rename ion_uhandle_get to ion_handle_get_by_id, and have it take the client lock and return with an extra reference to the handle. Make each caller put its reference once it is done with the handle. Also modify users of ion_handle_validate to continue to hold the client lock after calling ion_handle_validate until they are done with the handle, and warn if ion_handle_validate is called without the client lock held. Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions