On Tue, Oct 3, 2023 at 11:30 PM Tony Luck <tony.luck@xxxxxxxxx> wrote: > diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > index 725344048f85..04c164f6d39d 100644 > --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c > +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > @@ -1345,10 +1345,13 @@ unsigned int rdtgroup_cbm_to_size(struct rdt_resource *r, > unsigned int size = 0; > int num_b, i; > > + if (WARN_ON_ONCE(r->scope != RESCTRL_L2_CACHE && r->scope != RESCTRL_L3_CACHE)) > + return size; Thanks! Reviewed-by: Peter Newman <peternewman@xxxxxxxxxx>