lkml.org 
[lkml]   [2022]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/4] irqdomain: Fix mapping-creation race
Date
Parallel probing (e.g. due to asynchronous probing) of devices that
share interrupts can currently result in two mappings for the same
hardware interrupt to be created.

This series adds a serialising mapping mutex so that looking for an
existing mapping before creating a new one is done atomically.

Included are also some related clean ups that remove a redundant lookup
for existing mappings and make the domain-association locking more fine
grained.

Johan


Changes in v2
- split out redundant lookup cleanup (1/4)
- use a per-domain mutex to address mapping race (2/4)
- move kernel-doc to exported function (2/4)
- fix association race (3/4, new)
- use per-domain mutex for associations (4/4, new)


Johan Hovold (4):
irqdomain: Look for existing mapping only once
irqdomain: Fix mapping-creation race
irqdomain: Fix domain-association race
irqdomain: use per-domain mutex for associations

include/linux/irqdomain.h | 2 +
kernel/irq/irqdomain.c | 104 ++++++++++++++++++++++++--------------
2 files changed, 69 insertions(+), 37 deletions(-)

--
2.35.1

\
 
 \ /
  Last update: 2022-09-01 16:29    [W:0.075 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site