Initialize the ofw_bus_devinfo on the portals to prevent a crash.
If the device tree doesn't contain a cpu-handle field in any bman-portal or qman-portal, it will exit without setting up the devinfo, leaving it uninitialized. This will lead to attempts to free random memory, and ultimately panic.
This commit is contained in:
parent
dc9b124d66
commit
3413fe9770
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307763
@ -143,7 +143,7 @@ bman_portals_fdt_attach(device_t dev)
|
||||
ihandle_t cpu;
|
||||
int cpu_num, cpus, intr_rid;
|
||||
struct dpaa_portals_devinfo di;
|
||||
struct ofw_bus_devinfo ofw_di;
|
||||
struct ofw_bus_devinfo ofw_di = {};
|
||||
|
||||
cpus = 0;
|
||||
sc = device_get_softc(dev);
|
||||
|
@ -143,7 +143,7 @@ qman_portals_fdt_attach(device_t dev)
|
||||
ihandle_t cpu;
|
||||
int cpu_num, cpus, intr_rid;
|
||||
struct dpaa_portals_devinfo di;
|
||||
struct ofw_bus_devinfo ofw_di;
|
||||
struct ofw_bus_devinfo ofw_di = {};
|
||||
|
||||
cpus = 0;
|
||||
sc = device_get_softc(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user