commit | c47385c73fced27375559d1a2eb10f165a0869b0 | [log] [tgz] |
---|---|---|
author | Lee Jones <lee.jones@linaro.org> | Tue Jan 25 14:18:08 2022 +0000 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Sat Jan 29 10:15:58 2022 +0100 |
tree | 1e6820d8f09d750e1c4fce56115d35cfe3ef17e6 | |
parent | a8200613c8c9fbaf7b55d4d438376ebaf0c4ce7e [diff] |
ion: Do not 'put' ION handle until after its final use pass_to_user() eventually calls kref_put() on an ION handle which is still live, potentially allowing for it to be legitimately freed by the client. Prevent this from happening before its final use in both ION_IOC_ALLOC and ION_IOC_IMPORT. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>