LWIS: Make sure client cleanup is done before releasing.
Refactored lwis_release_client into 2 steps: lwis_cleanup_client and
kfree(lwis_client). lwis_release_client will call cleanup first, then
remove it from the device's client list, and then call kfree. This
affects two paths:
- lwis_release: This should fix the illegal address paging request
because previously we removed the list node before cleaning up,
which lwis_device_event_emit_impl (called by periodic IO) could still
be able to access the removed node.
- lwis_driver_exit: During lwis_release_client it will also remove
the client node, it should have no difference in the outcome (only
several additional CPU cycles, due to removing the node for each
client).
Bug: 192624604
Test: CTS, kill camera service, module unload by reboot/poweroff.
Signed-off-by:
Firman Hadi Prayoga <firmanhp@google.com>
Change-Id: Ib634e145841632e18cfc3ada3445053d94aa34d7
Loading
Please sign in to comment