mirror of
https://github.com/torvalds/linux.git
synced 2026-07-26 17:20:32 +02:00
__destroy_component_cfg() adds each RIS mbwu_state object to the MPAM
garbage list when destroying component configuration.
However, mbwu_state is allocated per RIS and only for RISes with MBWU
monitors. A component can therefore have comp->cfg allocated while some
RISes still have ris->mbwu_state set to NULL.
Passing a NULL mbwu_state to add_to_garbage() dereferences the NULL
pointer inside the macro.
Skip RISes that do not have an mbwu_state object before adding them to
the garbage list.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| mpam_devices.c | ||
| mpam_internal.h | ||
| mpam_resctrl.c | ||
| test_mpam_devices.c | ||
| test_mpam_resctrl.c | ||