From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, jiri@resnulli.us, johannes@sipsolutions.net,
gal@nvidia.com, tariqt@nvidia.com, lucien.xin@gmail.com,
f.fainelli@gmail.com, andrew@lunn.ch, simon.horman@corigine.com,
linux@rempel-privat.de, mkubecek@suse.cz
Subject: Re: [PATCH net-next 10/10] ethtool: netlink: always pass genl_info to .prepare_data
Date: Thu, 10 Aug 2023 21:40:03 +0300 [thread overview]
Message-ID: <20230810184003.id4ouegp3kp6ciki@skbuf> (raw)
In-Reply-To: <20230809182648.1816537-11-kuba@kernel.org> <20230809182648.1816537-11-kuba@kernel.org>
On Wed, Aug 09, 2023 at 11:26:48AM -0700, Jakub Kicinski wrote:
> We had a number of bugs in the past because developers forgot
> to fully test dumps, which pass NULL as info to .prepare_data.
> .prepare_data implementations would try to access info->extack
> leading to a null-deref.
>
> Now that dumps and notifications can access struct genl_info
> we can pass it in, and remove the info null checks.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: gal@nvidia.com
> CC: tariqt@nvidia.com
> CC: lucien.xin@gmail.com
> CC: f.fainelli@gmail.com
> CC: andrew@lunn.ch
> CC: vladimir.oltean@nxp.com
> CC: simon.horman@corigine.com
> CC: linux@rempel-privat.de
> CC: mkubecek@suse.cz
> CC: johannes@sipsolutions.net
> ---
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # pause
with:
$ ethtool -I --show-pause eno3 --src pmac
netlink error: ethtool_nl: Device does not support MAC merge layer
netlink error: Operation not supported
next prev parent reply other threads:[~2023-08-10 18:41 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 18:26 [PATCH net-next 00/10] genetlink: provide struct genl_info to dumps Jakub Kicinski
2023-08-09 18:26 ` [PATCH net-next 01/10] genetlink: use push conditional locking info dumpit/done Jakub Kicinski
2023-08-09 20:56 ` Johannes Berg
2023-08-10 6:54 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 02/10] genetlink: make genl_info->nlhdr const Jakub Kicinski
2023-08-10 8:22 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 03/10] genetlink: remove userhdr from struct genl_info Jakub Kicinski
2023-08-09 20:59 ` Johannes Berg
2023-08-09 22:02 ` Jakub Kicinski
2023-08-10 8:26 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 04/10] genetlink: add struct genl_info to struct genl_dumpit_info Jakub Kicinski
2023-08-10 8:33 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 05/10] genetlink: use attrs from struct genl_info Jakub Kicinski
2023-08-09 21:04 ` Johannes Berg
2023-08-10 6:17 ` Miquel Raynal
2023-08-10 8:35 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 06/10] genetlink: add a family pointer to " Jakub Kicinski
2023-08-09 18:26 ` [PATCH net-next 07/10] genetlink: add genlmsg_iput() API Jakub Kicinski
2023-08-10 9:07 ` Jiri Pirko
2023-08-10 16:13 ` Jakub Kicinski
2023-08-10 16:42 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 08/10] netdev-genl: use struct genl_info for reply construction Jakub Kicinski
2023-08-10 9:10 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 09/10] ethtool: netlink: simplify arguments to ethnl_default_parse() Jakub Kicinski
2023-08-10 9:12 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 10/10] ethtool: netlink: always pass genl_info to .prepare_data Jakub Kicinski
2023-08-10 18:40 ` Vladimir Oltean [this message]
2023-08-10 8:30 ` [PATCH net-next 00/10] genetlink: provide struct genl_info to dumps Jiri Pirko
2023-08-10 16:14 ` Jakub Kicinski
2023-08-10 16:43 ` Jiri Pirko
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=20230810184003.id4ouegp3kp6ciki@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=gal@nvidia.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux@rempel-privat.de \
--cc=lucien.xin@gmail.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=tariqt@nvidia.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