Subject: Re: [patch net-next 01/10] genetlink: don't merge dumpit split op for different cmds into single iter

From: Jakub Kicinski <[email-masked]>
Date: Tue, 10 Oct 2023 11:48:45 -0700

On Tue, 10 Oct 2023 13:08:20 +0200 Jiri Pirko wrote:
> Fixes: b8fd60c36a44 ("genetlink: allow families to use split ops directly")

Drop Fixes, add "currently no family declares ops which could trigger
this issue".

>  	if (i + cnt < family->n_split_ops &&
> -	    family->split_ops[i + cnt].flags & GENL_CMD_CAP_DUMP) {
> +	    family->split_ops[i + cnt].flags & GENL_CMD_CAP_DUMP &&
> +	    (!cnt ||
> +	     (cnt && family->split_ops[i + cnt].cmd == iter->doit.cmd))) {

Why are you checking cnt? if do was not found cmd will be 0, which
cannot mis-match.