The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8af9d5e04a21be6160a8d55f7d04526646ef56e2
commit 8af9d5e04a21be6160a8d55f7d04526646ef56e2 Author: Nimish Jain <[email protected]> AuthorDate: 2026-08-18 14:41:38 +0000 Commit: Mark Johnston <[email protected]> CommitDate: 2026-09-02 17:40:28 +0000 virtio_p9fs: Disallow detach if a session is in progress PR: 295453 Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57500 (cherry picked from commit b39457bb1566912062b2df551b7b8d429b8ba0da) --- sys/dev/virtio/p9fs/virtio_p9fs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index 3f06a90ca981..7586c5f03cf7 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -271,6 +271,10 @@ vt9p_detach(device_t dev) struct vt9p_softc *sc; sc = device_get_softc(dev); + + if (sc->busy) + return (EBUSY); + VT9P_LOCK(sc); vt9p_stop(sc); VT9P_UNLOCK(sc);
