[PATCH 1/6] accel/ivpu: Add missing locks around mmu queues

Jeffrey Hugo quic_jhugo at quicinc.com
Tue Feb 18 15:52:44 UTC 2025


On 2/17/2025 8:26 AM, Jacek Lawrynowicz wrote:
> Hi,
> 
> On 2/14/2025 5:41 PM, Jeffrey Hugo wrote:
>> On 2/4/2025 1:46 AM, Jacek Lawrynowicz wrote:
>>> From: Andrzej Kacprowski <Andrzej.Kacprowski at intel.com>
>>>
>>> Multiple threads were accessing mmu cmd queue simultaneously
>>> causing sporadic failures in ivpu_mmu_cmdq_sync() function.
>>> Protect critical code with mmu mutex.
>>
>> Describe a scenario in which this can occur? The two functions this patch modify cannot run concurrently from what I can tell.
> 
> Functions from this diff are called in bottom IRQ handler when memory faults are detected.
> The CMDQ is also accessed from IOCTLs when mapping/unmapping buffers in NPU MMU (ivpu_mmu_invalidate_tlb()).

Ah.  Ok.  I think pointing that out in the commit text would be very 
helpful.

Reviewed-by: Jeffrey Hugo <quic_jhugo at quicinc.com>


More information about the dri-devel mailing list