Subject: Re: [PATCH bpf] net/sched: cls_bpf: prevent unbounded recursion in offload rollback

From: Jakub Kicinski <[email-masked]>
Date: Mon, 25 May 2026 11:03:03 -0700

On Fri, 22 May 2026 10:58:53 +0800 Jiayuan Chen wrote:
> -	if (prog && err) {
> -		cls_bpf_offload_cmd(tp, oldprog, prog, extack);
> +	if (prog && err && !is_rollback) {
> +		cls_bpf_offload_cmd(tp, oldprog, prog, extack, true);
>  		return err;
>  	}

Doesn't matter in practice but for code clarity we should only gate 
the call to cls_bpf_offload_cmd() not the entire error path.

With that:

Reviewed-by: Jakub Kicinski <[email-masked]>

I'd take this via -next.