]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
md: Clamp to a multiple of the sector size when resizing
authorMark Johnston <markj@FreeBSD.org>
Tue, 31 Aug 2021 19:35:08 +0000 (15:35 -0400)
committerMark Johnston <markj@FreeBSD.org>
Tue, 31 Aug 2021 19:50:04 +0000 (15:50 -0400)
commit47619b604402c9672a0f9bf62666f3bcba1dfb7e
tree60f3611fd1f1d4a2681f7a2287ce425ba6e02e8f
parente3bdf3da769a55f0944d9c337bb4d91b6435f02c
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
sys/dev/md/md.c