[PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg()

Haiyang Zhang haiyangz at microsoft.com
Fri May 25 19:51:50 UTC 2018



> -----Original Message-----
> From: Dexuan Cui
> Sent: Tuesday, May 22, 2018 8:18 PM
> To: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>; Bjorn Helgaas
> <bhelgaas at google.com>; linux-pci at vger.kernel.org; KY Srinivasan
> <kys at microsoft.com>; Stephen Hemminger <sthemmin at microsoft.com>;
> olaf at aepfle.de; apw at canonical.com; jasowang at redhat.com
> Cc: linux-kernel at vger.kernel.org; driverdev-devel at linuxdriverproject.org;
> Haiyang Zhang <haiyangz at microsoft.com>; vkuznets at redhat.com;
> marcelo.cerri at canonical.com
> Subject: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in
> hv_compose_msi_msg()
> 
> 
> Commit de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in hv_compose_msi_msg()")
> uses local_bh_disable()/enable(), because hv_pci_onchannelcallback() can also
> run in tasklet context as the channel event callback.
> 
> With CONFIG_PROVE_LOCKING=y in the latest mainline, or old kernels that
> don't have commit f71b74bca637 ("irq/softirqs: Use lockdep to assert IRQs are
> disabled/enabled"), it turns out can we trigger a warning at the beginning of
> __local_bh_enable_ip(), because the upper layer irq code can call
> hv_compose_msi_msg() with local irqs disabled.
> 
> Let's fix the warning by switching to local_irq_save()/restore(). This is not an
> issue because hv_pci_onchannelcallback() is not slow, and it not a hot path.
> 
> Fixes: de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in hv_compose_msi_msg()")
> Signed-off-by: Dexuan Cui <decui at microsoft.com>
> Cc: <stable at vger.kernel.org>
> Cc: Stephen Hemminger <sthemmin at microsoft.com>
> Cc: K. Y. Srinivasan <kys at microsoft.com>
> ---

Reviewed-by: Haiyang Zhang <haiyangz at microsoft.com>

Thanks you.



More information about the devel mailing list