git: 5e77282d3a35 - stable/14 - mqueuefs: mark newly allocated vnode as constructed, under the lock

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 29 May 2024 05:36:04 UTC
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=5e77282d3a35f4bff0f15678b27a71aaac041762

commit 5e77282d3a35f4bff0f15678b27a71aaac041762
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-05-22 02:39:59 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-05-29 05:35:38 +0000

    mqueuefs: mark newly allocated vnode as constructed, under the lock
    
    (cherry picked from commit f0a4dd6d46e99d47fde12aabdaa52e75b59e95f4)
---
 sys/kern/uipc_mqueue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index dd6bf3c4a0a9..5fcabbac7923 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -811,6 +811,7 @@ found:
 		panic("%s has unexpected type: %d", pn->mn_name, pn->mn_type);
 	}
 	sx_xunlock(&mqfs->mi_lock);
+	vn_set_state(*vpp, VSTATE_CONSTRUCTED);
 	return (0);
 }