Skip to content
Snippets Groups Projects
Commit 1025a960 authored by Glauber Costa's avatar Glauber Costa
Browse files

xenfront: initialize softc structure

The Xen hypervisor not always initialize its pages. The BSD drivers will
however assume they are zeroed, and so things may break if they are not
(misterious flag tests suddenly being true, for instance).

Initialize manually the data we have just received from malloc when we deal
with softc.
parent 0e62d585
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,7 @@ void xenfront_driver::set_ivars(struct xenbus_device_ivars *ivars)
_bsd_dev.softc = malloc(table->size);
// Simpler and we don't expect driver loading to fail anyway
assert(_bsd_dev.softc);
memset(_bsd_dev.softc, 0, table->size);
}
void xenfront_driver::finished()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment