Commit Graph
5 Commits
Author SHA1 Message Date
Tejas Prajapati 04627d7bfc msm: camera: memmgr: Update copyright fix
CRs-Fixed: 3161837
Change-Id: Ibf7a6fc9f3ed7b75cad90d88444078621944fbad
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-04-08 07:14:10 -07:00
Tejas Prajapati d4d1e1402e msm: camera: memmgr: Update copyright fix
CRs-Fixed: 3161837
Change-Id: Ibf7a6fc9f3ed7b75cad90d88444078621944fbad
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-03-30 10:38:26 -07:00
Tejas Prajapati e561ca2a21 msm: camera: memmgr: update correct length in bufq
In a corner case race condition to free the original
ion buf allocated and new ion buffer with same fd but
different size after freeing the origianl ion buf might
result into mismatches in the real ion buf size assigned
in bufq. To avoid this update length in bufq with
local variable.

CRs-Fixed: 3142221
Change-Id: I8241544dba7609662d01f8d765e8d171b8288baa
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-03-07 17:26:08 +05:30
Tejas Prajapati 66de6dd5e0 msm: camera: reqmgr: check if link handle is correctly passed
Instead of the link handle if the dev handle is
passed for dumping the request information, this
can lead to accessing invalid data structure.
To avodi accessing invalid data structure based on
the dev handle, first check if the link handle passed
in IOCTL is matchting with looked up link handle.

CRs-Fixed: 3097336
Change-Id: I815457ff96e3b26fe9fa886bd984d53d209e4edb
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-02-09 09:07:33 -08:00
Tejas Prajapati b2e5336673 msm: camera: reqmgr: reader writer locks to avoid memory faults
Shared memory is initialized by CRM and used by
other drivers; with CRM not active other drivers
would fail to access the shared memory if
memory manager is deinit. Reader Writer locks can
prevent the open/close/ioctl calls from other drivers
if CRM open/close is already being processed.

Issue observed with the below sequence if drivers
are opened from UMD directly without this change.
CRM Open successful,ICP open successful,
CRM close in progress, ICP open successful,
mem mgr deinit and CRM close successful,
ICP tries to access HFI memory and result in crash.

This change helps to serialze the calls and prevents
issue.

CRs-Fixed: 3019488
Change-Id: Ifdf198c2e3593050573c66aeba69d50d131435b9
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-01-07 17:26:05 +05:30