The VFS `struct vnode` structure has two `uk_list_head` members:
`v_link` and `v_names`. These need to be initialized by a dedicated
macro / function, such as `UK_LIST_HEAD_INIT`.
The `stdio_vnode` variable (of type `struct vnode`) is not initializing
these members (they are filled with zeros). This will cause crashes when
using them.
This commit fixes that by properly initializing the `v_link` and
`v_names` members of the `stdio_vnode` variable.
Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
.v_op = &stdio_vnops,
.v_lock = UK_MUTEX_INITIALIZER(stdio_vnode.v_lock),
.v_refcnt = 1,
+ .v_link = UK_LIST_HEAD_INIT(stdio_vnode.v_link),
+ .v_names = UK_LIST_HEAD_INIT(stdio_vnode.v_names),
.v_type = VCHR,
};