HomeFreeBSD

md: Clamp to a multiple of the sector size when resizing

Description

md: Clamp to a multiple of the sector size when resizing

We do this when creating md(4) devices, in kern_mdattach_locked(), but
not when resizing the provider. Apply the same policy when resizing, as
many GEOM classes do not expect to deal with providers for which
pp->mediasize % pp->sectorsize != 0.

Reported by: syzkaller
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on Aug 31 2021, 7:35 PM
Parents
rGe3bdf3da769a: nvme(4): Add MSI and single MSI-X support.
Branches
Unknown
Tags
Unknown