Commit 024cb55
committed
net: ethtool: fix the error condition in ethtool_get_phy_stats_ethtool()
JIRA: https://issues.redhat.com/browse/RHEL-46358
JIRA: https://issues.redhat.com/browse/RHEL-47900
CVE: CVE-2024-40928
Upstream Status: net.git commit 0dcc53a
commit 0dcc53a
Author: Su Hui <suhui@nfschina.com>
Date: Wed Jun 5 11:47:43 2024 +0800
net: ethtool: fix the error condition in ethtool_get_phy_stats_ethtool()
Clang static checker (scan-build) warning:
net/ethtool/ioctl.c:line 2233, column 2
Called function pointer is null (null dereference).
Return '-EOPNOTSUPP' when 'ops->get_ethtool_phy_stats' is NULL to fix
this typo error.
Fixes: 201ed31 ("net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers")
Signed-off-by: Su Hui <suhui@nfschina.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://lore.kernel.org/r/20240605034742.921751-1-suhui@nfschina.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>1 parent 095cf60 commit 024cb55
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2230 | 2230 | | |
2231 | 2231 | | |
2232 | 2232 | | |
2233 | | - | |
| 2233 | + | |
2234 | 2234 | | |
2235 | 2235 | | |
2236 | 2236 | | |
| |||
0 commit comments