Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 18e10bee authored by Siva Kumar Akkireddi's avatar Siva Kumar Akkireddi Committed by Gauri Joshi
Browse files

msm: mhi_dev: Redesign UCI transfer request structure management



Invalid memory access can happen if a client closes its channels
with transfers pending because the mhi transfer request structure
gets freed in UCI when channel is closed, but MHI driver accesses the
request structure in the transfer completion callback.

To avoid the invalid memory access, following changes are done:
  * Allocate mhi transfer request structures for a client in the
    first UCI client open call
  * Do not free mhi transfer request structs when client calls release,
    to allow for subsequent re-use
  * Maintain an in-use list to track active transfers
  * If a client exits with transfers pending, move the request structs
    corresponding to pending transfers to free list and mark them as
    stale.
  * Stale transfers, if completed later, are ignored.

Change-Id: I170e06321de9c67b0a1d107b775d75b2ed97febb
Signed-off-by: default avatarSiva Kumar Akkireddi <sivaa@codeaurora.org>
Signed-off-by: default avatarGauri Joshi <gaurjosh@codeaurora.org>
parent 2adfda1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment