Thread (30 messages) 30 messages, 5 authors, 2023-08-10

Re: [PATCH net-next 10/10] ethtool: netlink: always pass genl_info to .prepare_data

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2023-08-10 18:41:11

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help