Skip to content

irqdomain: Fix mapping-creation race

Johan Hovold lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 2 repliesIn review
  2. v11 patch 4 repliesSuperseded

Changes in v2 from the cover letter

- 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)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4irqdomain: Look for existing mapping only oncekernel/irq/irqdomain.c+33 -270 replies
2/4irqdomain: Fix mapping-creation raceinclude/linux/irqdomain.h kernel/irq/irqdomain.c+26 -92 replies
3/4irqdomain: Fix domain-association racekernel/irq/irqdomain.c+14 -50 replies
4/4irqdomain: use per-domain mutex for associationskernel/irq/irqdomain.c+3 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] irqdomain: Fix mapping-creation race

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(-)
Signature · 1 line
2.35.1