]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
lib/vfscore: Initialize lists for stdio_vnode init-stdio-list 889/head
authorRazvan Deaconescu <razvand@unikraft.io>
Fri, 12 May 2023 22:28:57 +0000 (01:28 +0300)
committerRazvan Deaconescu <razvand@unikraft.io>
Fri, 12 May 2023 22:30:21 +0000 (01:30 +0300)
commitcb7929ed884eeec4e55c311545b35c02e69ba9df
tree8d8826c580b380bbfb78e6e7f748f50a4803468b
parentd7f598242afd95dceab42983d8d616885e618cbf
lib/vfscore: Initialize lists for stdio_vnode

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>
lib/vfscore/stdio.c