ion: remove unsafe function ion_handle_get_by_id()

The function ion_handle_get_by_id() is called from function
msm_ion_custom_ioctl(), so we retained it even though it got
deleted in commit 2c155709e4ef2d86d0176aac82e44c048a7e0255
("staging: android: ion: fix ION_IOC_{MAP,SHARE} use-after-free").

This can lead to same use-after-free scenario with
ION_IOC_{CLEAN_CACHES,INV_CACHES,CLEAN_INV_CACHES} so removing
this unsafe function and holding client->lock for entire operation.

Issue: SEC-3442
Change-Id: I536cfa69465ad692794500e3b31ac137d04940ff
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Signed-off-by: Vijayanand Jitta <quic_vjitta@quicinc.com>
(cherry picked from commit cccd8269b8f8f442576762f9386c75178a07f1c1)
3 files changed