Re: [PATCH net-next v3 1/2] netdev-genl: Add an XSK attribute to queues

From: Joe Damato
Date: Thu Feb 06 2025 - 20:32:01 EST


On Thu, Feb 06, 2025 at 04:57:46PM -0800, Jakub Kicinski wrote:
> On Tue, 4 Feb 2025 19:10:47 +0000 Joe Damato wrote:
> > + if (rxq->pool) {
> > + nest = nla_nest_start(rsp, NETDEV_A_QUEUE_XSK);
> > + nla_nest_end(rsp, nest);
> > + }
>
> nla_nest_start() can fail, you gotta nul-check the return value.
> You could possibly add an nla_put_empty_nest() helper in netlink.h
> to make this less awkward? I think the iouring guys had the same bug

Ah, right.

I'll see what a helper looks like. Feels like maybe overkill?

Thanks for the review.