lkml.org 
[lkml]   [2021]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: pcie-uniphier: race condition in masking/unmasking interrupts
From
Date
Hi Pali,

On 2021/08/18 20:38, Pali Rohár wrote:
> Hello!
>
> Marc pointed during review of pci-aardvark patches one issue which I see
> that is available also in the current pcie-uniphier.c driver.
>
> When masking or unmasking interrupts there is read-modify-write sequence
> for PCL_RCV_INTX_MASK_SHIFT register without any locking:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/dwc/pcie-uniphier.c?h=v5.13#n171
>
> So when trying to mask/unmask two interrupts at the same time there is
> race condition as updating that PCL_RCV_INTX_MASK_SHIFT register is not
> atomic.
>
> Could you look at it?
Thank you for pointing out.
I'll update the mask/unmask/ack operations to avoid race condition.

Thank you,

---
Best Regards
Kunihiko Hayashi

\
 
 \ /
  Last update: 2021-08-19 12:02    [W:0.064 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site