From: Joe Damato <jdamato@fastly.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Donald Hunter <donald.hunter@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
Stanislav Fomichev <sdf@fomichev.me>,
Mina Almasry <almasrymina@google.com>,
Daniel Jurgens <danielj@nvidia.com>,
Martin Karsten <mkarsten@uwaterloo.ca>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v3 1/2] netdev-genl: Add an XSK attribute to queues
Date: Thu, 6 Feb 2025 17:31:47 -0800 [thread overview]
Message-ID: <Z6Vig04c-a46WScr@LQ3V64L9R2> (raw)
In-Reply-To: <20250206165746.7cf392b6@kernel.org>
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.
next prev parent reply other threads:[~2025-02-07 1:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 19:10 [PATCH net-next v3 0/2] netdevgenl: Add an xsk attribute to queues Joe Damato
2025-02-04 19:10 ` [PATCH net-next v3 1/2] netdev-genl: Add an XSK " Joe Damato
2025-02-07 0:57 ` Jakub Kicinski
2025-02-07 1:31 ` Joe Damato [this message]
2025-02-07 1:41 ` Jakub Kicinski
2025-02-07 1:46 ` Joe Damato
2025-02-07 6:43 ` kernel test robot
2025-02-04 19:10 ` [PATCH net-next v3 2/2] selftests: drv-net: Test queue xsk attribute Joe Damato
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z6Vig04c-a46WScr@LQ3V64L9R2 \
--to=jdamato@fastly.com \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=danielj@nvidia.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkarsten@uwaterloo.ca \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).