Re: [net-next v6 6/9] netdev-genl: Support setting per-NAPI config values

From: Paolo Abeni
Date: Tue Nov 12 2024 - 04:33:32 EST


On 10/11/24 20:45, Joe Damato wrote:
> +int netdev_nl_napi_set_doit(struct sk_buff *skb, struct genl_info *info)
> +{
> + struct napi_struct *napi;
> + unsigned int napi_id;
> + int err;
> +
> + if (GENL_REQ_ATTR_CHECK(info, NETDEV_A_NAPI_ID))
> + return -EINVAL;
> +
> + napi_id = nla_get_u32(info->attrs[NETDEV_A_NAPI_ID]);
> +
> + rtnl_lock();
> +
> + napi = napi_by_id(napi_id);

AFAICS the above causes a RCU splat in the selftests:

https://netdev-3.bots.linux.dev/vmksft-net-dbg/results/856342/61-busy-poll-test-sh/stderr

because napi_by_id() only checks for the RCU lock.

Could you please have a look?

Thanks!

Paolo