Re: [PATCH net-next v3 1/2] netdev-genl: Add an XSK attribute to queues
From: Jakub Kicinski
Date: Thu Feb 06 2025 - 19:57:55 EST
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