Commit 29308a66 authored by Firman Hadi Prayoga's avatar Firman Hadi Prayoga
Browse files

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: default avatarFirman Hadi Prayoga <firmanhp@google.com>
Change-Id: Ib634e145841632e18cfc3ada3445053d94aa34d7
parent 442f28f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment