Skip to content
Commit 504e1d6e authored by Daniel Rosenberg's avatar Daniel Rosenberg Committed by Greg Kroah-Hartman
Browse files

ion: Fix use after free during ION_IOC_ALLOC



If a user happens to call ION_IOC_FREE during an ION_IOC_ALLOC
on the just allocated id, and the copy_to_user fails, the cleanup
code will attempt to free an already freed handle.

This adds a wrapper for ion_alloc that adds an ion_handle_get to
avoid this.

Signed-off-by: default avatarDaniel Rosenberg <drosen@google.com>
Signed-off-by: default avatarDennis Cagle <d-cagle@codeaurora.org>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d47e16bb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment