ethtool: pse-pd: fix null-deref on genl_info in dump

ethnl_default_dump_one() passes NULL as info.

It's correct not to set extack during dump, as we should just
silently skip interfaces which can't provide the information.

Reported-by: [email protected]
Fixes: 18ff0bcda6 ("ethtool: add interface to interact with Ethernet Power Equipment")
Signed-off-by: Jakub Kicinski <[email protected]>
Reviewed-by: Oleksij Rempel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Jakub Kicinski
2022-10-21 13:18:05 +01:00
committed by David S. Miller
parent e840d8f4a1
commit 46cdedf2a0
+1 -1
View File
@@ -64,7 +64,7 @@ static int pse_prepare_data(const struct ethnl_req_info *req_base,
if (ret < 0)
return ret;
ret = pse_get_pse_attributes(dev, info->extack, data);
ret = pse_get_pse_attributes(dev, info ? info->extack : NULL, data);
ethnl_ops_complete(dev);