On Tue, 7 Jul 2026 12:59:12 -0400
Michael Bommarito <[email protected]> wrote:
>
> +/*
> + * Deleting an event drops its last reference, but an unregister may defer
> + * that put (and the freeing of the associated enabler) past an RCU grace
> + * period. The delete can therefore transiently fail with -EBUSY while the
> + * previous reference is still being dropped. Retry for up to ~10 seconds.
> + */
> +static int wait_for_event_delete(void)
> +{
> + int i, ret;
> +
> + for (i = 0; i < 10000; ++i) {
> + ret = event_delete();
> +
> + if (ret == 0)
> + return 0;
> +
> + usleep(1000);
> + }
> +
> + return ret;
> +}
> +
Care to address Sashiko's comment:
https://sashiko.dev/#/patchset/20260707165912.2560537-2-michael.bommarito%40gmail.com
I'll pull in patch 1 and start testing it as this one is just the tools
change, it doesn't need my testing (my tests only tests kernel changes)
-- Steve