Subject: Re: [PATCH v24 net-next 1/6] sched: Struct definition and parsing of dualpi2 qdisc

From: Jakub Kicinski <[email-masked]>
Date: Fri, 18 Jul 2025 17:54:18 -0700

On Fri, 18 Jul 2025 01:24:22 +0200 [email-masked]
wrote:
> +	if (!opt || !nla_len(opt)) {
> +		NL_SET_ERR_MSG_MOD(extack, "Dualpi2 options are required");
> +		return -EINVAL;
> +	}
> +	err = nla_parse_nested(tb, TCA_DUALPI2_MAX, opt, dualpi2_policy,
> +			       extack);
> +	if (err < 0)
> +		return err;
> +
> +	q = qdisc_priv(sch);
> +	sch_tree_lock(sch);

[...]

> +	if (tb[TCA_DUALPI2_STEP_THRESH_PKTS] && tb[TCA_DUALPI2_STEP_THRESH_US]) {
> +		NL_SET_ERR_MSG_MOD(extack, "multiple step thresh attributes");
> +		return -EINVAL;
> +	} 

You're missing an unlock, please place the validation before
sch_tree_lock().
-- 
pw-bot: cr