Skip to content
  • Tejas Prajapati's avatar
    msm: camera: reqmgr: reader writer locks to avoid memory faults · 9a4ba3b5
    Tejas Prajapati authored
    
    
    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: default avatarTejas Prajapati <quic_tpraja@quicinc.com>
    9a4ba3b5