Re: [PATCH v2 12/12] arm_mpam: resctrl: Don't stop early when tearing down a class
From: Gavin Shan
Date: Tue Sep 22 2026 - 01:46:01 EST
On 9/18/26 12:56 AM, Ben Horgan wrote:
An MPAM class can back more than one control and more than oneReviewed-by: Gavin Shan <gshan@xxxxxxxxxx>
monitor. mpam_resctrl_teardown_class() iterates through all the controls
but stops if it finds a match which means classes backing more than one
class aren't torn down. The same for monitors, in which case the mbwu
counters will be leaked.
Stop terminating the loops early.
As we are already changing mpam_resctrl_teardown_class() remove the
misleading comment. It doesn't call resctrl_exit() and isn't required to do
so as the only caller does it first.
Fixes: fb481ec08699 ("arm_mpam: resctrl: Call resctrl_init() on platforms that can support resctrl")
Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
Changes since v1:
New patch
---
drivers/resctrl/mpam_resctrl.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)