[PATCH 2/5] arm_mpam: Split the locking around the mon_sel registers
Niyas Sait
niyas.sait at arm.com
Mon May 18 03:31:32 PDT 2026
Hi Andre,
On Wed, Apr 29, 2026 at 04:13:36PM +0200, Andre Przywara wrote:
> @@ -1635,8 +1643,11 @@ static int mpam_restore_mbwu_state(void *_ris)
> u64 val;
> struct mon_read mwbu_arg;
> struct mpam_msc_ris *ris = _ris;
> + struct mpam_msc *msc = ris->vmsc->msc;
> struct mpam_class *class = ris->vmsc->comp->class;
>
> + mpam_mon_sel_outer_lock(msc);
> +
> for (i = 0; i < ris->props.num_mbwu_mon; i++) {
> if (ris->mbwu_state[i].enabled) {
> mwbu_arg.ris = ris;
> @@ -1648,10 +1659,12 @@ static int mpam_restore_mbwu_state(void *_ris)
> }
> }
>
> + mpam_mon_sel_outer_unlock(msc);
> +
> return 0;
> }
There looks to be a lock nesting issue here. mpam_reprogram_msc() already
holds outer_mon_sel_lock when it calls mpam_restore_mbwu_state(), and
mpam_restore_mbwu_state() then takes the same outer lock again.
Thanks,
Niyas
More information about the linux-arm-kernel
mailing list