Page MenuHomeFreeBSD

p9fs: Disallow P9 device to detach if a session is in progress
ClosedPublic

Authored by njain15_protonmail.com on Jun 8 2026, 6:04 AM.
Tags
None
Referenced Files
F167015417: D57500.diff
Tue, Aug 18, 2:41 PM
F167015401: D57500.diff
Tue, Aug 18, 2:41 PM
F167015380: D57500.diff
Tue, Aug 18, 2:40 PM
F167015354: D57500.diff
Tue, Aug 18, 2:40 PM
F167015309: D57500.diff
Tue, Aug 18, 2:40 PM
Unknown Object (File)
Thu, Aug 13, 6:36 PM
Unknown Object (File)
Thu, Aug 13, 1:15 AM
Unknown Object (File)
Wed, Aug 12, 7:09 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

njain15_protonmail.com created this revision.
njain15_protonmail.com added a reviewer: markj.
This revision is now accepted and ready to land.Thu, Aug 13, 3:29 PM

Sorry, looking at this again I'm a bit confused. What does vt9p_detach() have to do with directory unmounting? vt9p_detach() runs when the virtio device itself is detached, which I presume wouldn't happen unless someone used devctl(8) to do so explicitly. What am I missing?

Sorry, looking at this again I'm a bit confused. What does vt9p_detach() have to do with directory unmounting? vt9p_detach() runs when the virtio device itself is detached, which I presume wouldn't happen unless someone used devctl(8) to do so explicitly. What am I missing?

The title was misleading. It should be "disallow P9 device to detach if a session is in progress." My bad.

What does vt9p_detach() have to do with directory unmounting

We don't check whether someone is using the channel before detaching the device. If you unmount after kldunload, then you get a panic.

Edit: actually, it seems you don't even need to umount for the panic. Just kldunload is enough.

njain15_protonmail.com retitled this revision from p9fs: Disallow directory unmounting if a session is in progress to p9fs: Disallow P9 device to detach if a session is in progress.Mon, Aug 17, 7:39 PM