Skip to content

Commit d4af0c1

Browse files
committed
Merge tag 'irq_urgent_for_v5.18_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fix from Borislav Petkov: - Fix locking when accessing device MSI descriptors * tag 'irq_urgent_for_v5.18_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: bus: fsl-mc-msi: Fix MSI descriptor mutex lock for msi_first_desc()
2 parents 57ae8a4 + c7d2f89 commit d4af0c1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/bus/fsl-mc/fsl-mc-msi.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,12 @@ int fsl_mc_msi_domain_alloc_irqs(struct device *dev, unsigned int irq_count)
224224
if (error)
225225
return error;
226226

227+
msi_lock_descs(dev);
227228
if (msi_first_desc(dev, MSI_DESC_ALL))
228-
return -EINVAL;
229+
error = -EINVAL;
230+
msi_unlock_descs(dev);
231+
if (error)
232+
return error;
229233

230234
/*
231235
* NOTE: Calling this function will trigger the invocation of the

0 commit comments

Comments
 (0)