Files
freebsd/sys/geom
Warner Losh 35b59986b5 g_part: access leak causes process to hang
So if one inserts a USB drive with a GPT that doesn't match the media
size, a resize is initiated, so gpart takes g_access(cp, 1, 1, 1) on the
disk and holds it until the resize is accepted or rejected. The orphan
path releases it, but the spoil path does not. So if the drive is
ejected while the resize is in flight, we call spoil directly, without
releasing the access. Since gpt_opened is not cleared for the spoil
path, this causes several different process to hang in the open path
waiting for the leaked access.

Move the release into the wither function when gpt_opened is set, and
remove the release elsewhere. Since all paths to destroy the geom pass
through wither, this ensure that access is always released when we've
taken the access for resize.

PR:			297777
Reported by:		Rick Richard
MFC After:		1 week
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D59138
2026-10-04 13:21:17 -06:00
..
2026-08-25 20:14:11 -04:00
2026-08-29 14:00:02 -04:00
2026-09-13 14:27:18 +02:00
2025-09-12 09:48:24 -06:00
…
2026-09-01 11:48:55 -04:00
2025-09-05 12:42:21 -06:00
…