mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 11:14:18 +01:00
tmpfs_node_init: use MTX_NEW on lock from uninitialized memory
Reported by: netchild Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45364
This commit is contained in:
parent
c68db4608e
commit
6bd3f23a2a
@ -349,7 +349,7 @@ tmpfs_node_init(void *mem, int size, int flags)
|
|||||||
|
|
||||||
node = mem;
|
node = mem;
|
||||||
node->tn_id = 0;
|
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();
|
node->tn_gen = arc4random();
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user