Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 2024 17:36:51 GMT
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6bd3f23a2a82 - main - tmpfs_node_init: use MTX_NEW on lock from uninitialized memory
Message-ID:  <202405261736.44QHapIO076126@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by rlibby:

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

commit 6bd3f23a2a828350b23350b0b183754f6f9c8d08
Author:     Ryan Libby <rlibby@FreeBSD.org>
AuthorDate: 2024-05-26 17:20:52 +0000
Commit:     Ryan Libby <rlibby@FreeBSD.org>
CommitDate: 2024-05-26 17:20:52 +0000

    tmpfs_node_init: use MTX_NEW on lock from uninitialized memory
    
    Reported by:    netchild
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D45364
---
 sys/fs/tmpfs/tmpfs_subr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index 53781202b066..3f74c383a171 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -349,7 +349,7 @@ tmpfs_node_init(void *mem, int size, int flags)
 
 	node = mem;
 	node->tn_id = 0;
-	mtx_init(&node->tn_interlock, "tmpfsni", NULL, MTX_DEF);
+	mtx_init(&node->tn_interlock, "tmpfsni", NULL, MTX_DEF | MTX_NEW);
 	node->tn_gen = arc4random();
 	return (0);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405261736.44QHapIO076126>