Commit 0e220252 authored by Florian Bezdeka's avatar Florian Bezdeka Committed by Jan Kiszka
Browse files

cobalt/registry: Initialize refcnt of exported virtual proc files



The refcnt field was never initialized and triggered a BUG() in
vfile_regular_release (vfile.c) when closing / releasing such a virtual
file.
Signed-off-by: default avatarFlorian Bezdeka <florian.bezdeka@siemens.com>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent d48aac37
......@@ -403,6 +403,7 @@ static int registry_export_vfreg(struct xnobject *object,
object->vfile_u.vfreg.privsz = p->vfile.privsz;
object->vfile_u.vfreg.ops = p->vfile.ops;
object->vfile_u.vfreg.entry.lockops = p->vfile.lockops;
object->vfile_u.vfreg.entry.refcnt = 0;
ret = xnvfile_init_regular(object->key, &object->vfile_u.vfreg,
&pnode->vdir);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment