The branch main has been updated by kib:

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

commit ac2576b9f7bc88b6f213141178102024705b03d3
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2021-01-07 16:34:02 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2021-01-10 02:48:36 +0000

    tmpfs open: assert that there is no double-init of f_data.
    
    Sponsored by:   The FreeBSD Foundation
---
 sys/fs/tmpfs/tmpfs_vnops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index 3c80c33ea047..90711b4849c5 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -311,6 +311,7 @@ tmpfs_open(struct vop_open_args *v)
        }
 
        fp = v->a_fp;
+       MPASS(fp == NULL || fp->f_data == NULL);
        if (error == 0 && fp != NULL && vp->v_type == VREG) {
                tmpfs_ref_node(node);
                finit_vnode(fp, mode, node, &tmpfs_fnops);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to