Skip to content

Commit 9d9effc

Browse files
lxinkuba-moo
authored andcommitted
ethtool: eeprom: fix null-deref on genl_info in dump
The similar fix as commit 46cdedf ("ethtool: pse-pd: fix null-deref on genl_info in dump") is also needed for ethtool eeprom. Fixes: c781ff1 ("ethtool: Allow network drivers to dump arbitrary EEPROM data") Signed-off-by: Xin Long <[email protected]> Link: https://lore.kernel.org/r/5575919a2efc74cd9ad64021880afc3805c54166.1666362167.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 337a0a0 commit 9d9effc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ethtool/eeprom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static int eeprom_prepare_data(const struct ethnl_req_info *req_base,
124124
if (ret)
125125
goto err_free;
126126

127-
ret = get_module_eeprom_by_page(dev, &page_data, info->extack);
127+
ret = get_module_eeprom_by_page(dev, &page_data, info ? info->extack : NULL);
128128
if (ret < 0)
129129
goto err_ops;
130130

0 commit comments

Comments
 (0)