igc: fix a log entry using uninitialized netdev
CVE-2024-42116
What is CVE-2024-42116?
In the Linux kernel, the following vulnerability has been resolved:
igc: fix a log entry using uninitialized netdev
During successful probe, igc logs this:
[ 5.133667] igc 0000:01:00.0 (unnamed net_device) (uninitialized): PHC added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The reason is that igc_ptp_init() is called very early, even before register_netdev() has been called. So the netdev_info() call works on a partially uninitialized netdev.
Fix this by calling igc_ptp_init() after register_netdev(), right after the media autosense check, just as in igb. Add a comment, just as in igb.
Now the log message is fine:
[ 5.200987] igc 0000:01:00.0 eth0: PHC added

Human OS v1.0:
Ageing Is an Unpatched Zero-Day Vulnerability.
Remediate biological technical debt. Prime Ageing uses 95% high-purity SIRT6 activation to maintain genomic integrity and bolster systemic resilience.
Affected Version(s)
Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 96839f3f588236593de36465f142b0126267f8b6
Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 98c8958980e829f023a490b9a9816ca1fe2f8b79
Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 991f036cabc3d13e886a37faeea1b6800181fdda