]> git.baikalelectronics.ru Git - kernel.git/commit
genirq/msi: Populate sysfs entry only once
authorThomas Gleixner <tglx@linutronix.de>
Mon, 10 Jan 2022 18:12:45 +0000 (19:12 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 10 Jan 2022 18:22:10 +0000 (19:22 +0100)
commit431bef34edf2b2b4b9b89c5b3e27cdb9f3367692
treea45cf74ccde4afd21ae12d5516d5ba81c839099f
parent28a45a1cc42f8998669f7ec66211f09ef3136e85
genirq/msi: Populate sysfs entry only once

The MSI entries for multi-MSI are populated en bloc for the MSI descriptor,
but the current code invokes the population inside the per interrupt loop
which triggers a warning in the sysfs code and causes the interrupt
allocation to fail.

Move it outside of the loop so it works correctly for single and multi-MSI.

Fixes: 44420f2336dc ("genirq/msi: Simplify sysfs handling")
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/87leznqx2a.ffs@tglx
kernel/irq/msi.c