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
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 47619b604402c9672a0f9bf62666f3bcba1dfb7e)

Details

Provenance
markjAuthored on Aug 31 2021, 7:35 PM
Parents
rG8522f7ddac08: sctp: Simplify the free port search in sctp_inpcb_bind()
Branches
Unknown
Tags
Unknown