git: 6bd3f23a2a82 - main - tmpfs_node_init: use MTX_NEW on lock from uninitialized memory
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 26 May 2024 17:36:51 UTC
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); }