From: Jakub Kicinski <kuba@kernel.org>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
dw@davidwei.uk, razor@blackwall.org, sdf@fomichev.me,
dtatulea@nvidia.com, bobbyeshleman@meta.com
Subject: Re: [PATCH net-next 1/4] netdev: check for nla_put_u32() failures
Date: Tue, 9 Jun 2026 15:05:52 -0700 [thread overview]
Message-ID: <20260609150552.2d962600@kernel.org> (raw)
In-Reply-To: <15c024cd-7ab1-47b4-94e5-90db0f74227f@iogearbox.net>
On Tue, 9 Jun 2026 21:52:25 +0200 Daniel Borkmann wrote:
> > - nla_put_u32(rsp, NETDEV_A_DMABUF_ID, binding->id);
> > + err = nla_put_u32(rsp, NETDEV_A_DMABUF_ID, binding->id);
> > + if (err)
> > + goto err_unbind;
> > +
>
> Not sure about these three tbh... if the skbs are guaranteed to be
> large enough, would a more straight forward ...
>
> WARN_ON_ONCE(err);
>
> ... suffice?
Sure, I guess it's subjective whether it's better to add a WARN
and have to explain why it can never happen or just call the
undo function since it's already available :)
> Unwinding at this point feels a bit excessive. Is there
> any other way we could assert this earlier before we do all the ops
> that need to be unwound?
It's dead code. We keep getting patches for "nla_* return value not
checked" tho, so if decided to squash these while at it..
I'll respin with WARN
next prev parent reply other threads:[~2026-06-09 22:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 19:08 [PATCH net-next 0/4] netdev: address a handful of nit picks Jakub Kicinski
2026-06-09 19:08 ` [PATCH net-next 1/4] netdev: check for nla_put_u32() failures Jakub Kicinski
2026-06-09 19:24 ` Bobby Eshleman
2026-06-09 19:52 ` Daniel Borkmann
2026-06-09 22:05 ` Jakub Kicinski [this message]
2026-06-09 19:56 ` Joe Damato
2026-06-09 19:08 ` [PATCH net-next 2/4] netdev: correct error code in netdev_nl_queue_fill_lease() Jakub Kicinski
2026-06-09 19:16 ` Bobby Eshleman
2026-06-09 19:48 ` Daniel Borkmann
2026-06-09 19:57 ` Joe Damato
2026-06-09 19:08 ` [PATCH net-next 3/4] netdev: avoid skipping objects on race with device disappearance Jakub Kicinski
2026-06-09 19:48 ` Daniel Borkmann
2026-06-09 19:59 ` Bobby Eshleman
2026-06-09 20:15 ` Bobby Eshleman
2026-06-09 21:19 ` Jakub Kicinski
2026-06-09 22:04 ` Bobby Eshleman
2026-06-09 19:08 ` [PATCH net-next 4/4] netdev: don't use dev->flags for IFF_UP Jakub Kicinski
2026-06-09 19:49 ` Daniel Borkmann
2026-06-09 19:54 ` Joe Damato
2026-06-09 20:00 ` Bobby Eshleman
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=20260609150552.2d962600@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bobbyeshleman@meta.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=sdf@fomichev.me \
/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