[PATCH 5.4 3/3] irqdomain: Fix mapping-creation race

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Johan Hovold <johan+linaro@xxxxxxxxxx>
> 
> [ Upstream commit 601363cc08da25747feb87c55573dd54de91d66a ]
> 
> Parallel probing of devices that share interrupts (e.g. when a driver
> uses asynchronous probing) can currently result in two mappings for the
> same hardware interrupt to be created due to missing serialisation.
> 
> Make sure to hold the irq_domain_mutex when creating mappings so that
> looking for an existing mapping before creating a new one is done
> atomically.
> 
> Fixes: 765230b5f084 ("driver-core: add asynchronous probing support for drivers")
> Fixes: b62b2cf5759b ("irqdomain: Fix handling of type settings for existing mappings")
> Link: https://lore.kernel.org/r/YuJXMHoT4ijUxnRb@xxxxxxxxxxxxxxxxxxxx
> Cc: stable@xxxxxxxxxxxxxxx      # 4.8
> Cc: Dmitry Torokhov <dtor@xxxxxxxxxxxx>
> Cc: Jon Hunter <jonathanh@xxxxxxxxxx>
> Tested-by: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx>
> Tested-by: Mark-PK Tsai <mark-pk.tsai@xxxxxxxxxxxx>
> Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
> Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/20230213104302.17307-7-johan+linaro@xxxxxxxxxx
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> Signed-off-by: Mark-PK Tsai <mark-pk.tsai@xxxxxxxxxxxx>

5.4 also need this patch.
Could someone please help to review it?

Thanks,
Mark-PK Tsai



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux