Re: [PATCH] clk: send abort notifications when a parent change is vetoed
From: Konrad Dybcio
Date: Mon Oct 26 2026 - 10:30:28 EST
On 10/21/26 11:28 PM, James Hilliard wrote:
> clk_core_set_parent_nolock() returns directly when a PRE_RATE_CHANGE
> notifier rejects the proposed parent. Consumers notified before the veto
> do not receive ABORT_RATE_CHANGE, even though they may have stopped I/O
> or reserved resources until the transition finishes. The caller also
> receives a positive notifier return value instead of a negative errno.
>
> Recalculate and notify the unchanged subtree with ABORT_RATE_CHANGE before
> returning -EBUSY, as for other failed parent changes. This lets prepared
> consumers unwind without changing the parent or its rate.
>
> Extend the mux notifier tests to cover both a self-veto and a later
> notifier vetoing after the first consumer accepted the change. Check the
> abort notification, errno and unchanged parent/rate in both cases.
>
> Fixes: b2476490ef11 ("clk: introduce the common clock framework")
> Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
> ---
Acked-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad