HomeFreeBSD

bcm_dma: attach at an earlier bus pass

Description

bcm_dma: attach at an earlier bus pass

The sdhci_bcm driver attach routine relies on bcm_dma already being
attached, in order to allocate a DMA channel. However, both drivers
attached at the default pass so this is not guaranteed. Newer RPI
firmware exposes this assumption, and the result is a NULL-dereference
in bcm_dma_allocate().

To fix this, use BUS_PASS_SUPPORTDEV for bcm_dma.

PR: 268835
Reviewed by: mhorne
MFC after: 1 week

Details

Provenance
markmi_dsl-only.netAuthored on Feb 17 2023, 8:30 PM
mhorneCommitted on Feb 24 2023, 5:20 PM
Parents
rG4036fcb8053a: nfsd: Fix a use after free when vnet prisons are deleted
Branches
Unknown
Tags
Unknown