Subject: Re: [PATCH v9 13/23] x86/virt/seamldr: Abort updates after a failed step
From: Dave Hansen <[email-masked]>
To: [email-masked]

[Draft review generated by x86-maintainer-agent applying Dave_Hansen.txt
 rules to the v9 series.  Strip this banner before sending.]

> +	ctrl->num_failed += !!result;
> +	ctrl->num_ack++;
> +	if (ctrl->num_ack == num_online_cpus() && !ctrl->num_failed)
> +		__set_target_state(ctrl, ctrl->state + 1);

Clean.  Counter-instead-of-flag is the right call -- thanks for taking
the v8 feedback.

> +	} while (curstate != MODULE_UPDATE_DONE && !READ_ONCE(update_ctrl.num_failed));

The READ_ONCE on the unlocked side is fine here: num_failed only ever
increases, so a stale-zero read just means one more iteration before
we exit, and the lock side never decrements it.

Reviewed-by: Dave Hansen <[email-masked]>