Skip to contentSkip to conversation

Patch "igc: fix a log entry using uninitialized netdev" has been added to the 6.9-stable tree

DISCUSSION Corinna Vinschen 2 participants 3 messages Jul 8, 2024 – Jul 9, 2024 1 message not in the archive Stable branch

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi Sasha,

my patch should not go into the stable branches. Under certain circumstances it triggered kernel crashes.

Consequentially this patch has been reverted in the main development branch:

8eef5c3cea65 Revert "igc: fix a log entry using uninitialized netdev"

So I suggest to remove my patch 86167183a17e from the stable branches or apply 8eef5c3cea65 as well.

Sorry and thanks,
Corinna

Quoted 70 lines · Sasha Levin

This is a note to let you know that I've just added the patch titled

igc: fix a log entry using uninitialized netdev

to the 6.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
igc-fix-a-log-entry-using-uninitialized-netdev.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

commit ee112b3c8929ec718b444134db87e1c585eb7d70

Author: Corinna Vinschen <[email protected]>
Date:   Tue Apr 23 12:24:54 2024 +0200

igc: fix a log entry using uninitialized netdev

[ Upstream commit 86167183a17e03ec77198897975e9fdfbd53cb0b ]

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

drivers/net/ethernet/intel/igc/igc_main.c +3 -2
index 58bc96021bb4c..07feb951be749 100644
@@ -6932,8 +6932,6 @@ static int igc_probe(struct pci_dev *pdev,
 	device_set_wakeup_enable(&adapter->pdev->dev,
 				 adapter->flags & IGC_FLAG_WOL_SUPPORTED);
 
-	igc_ptp_init(adapter);
-
 	igc_tsn_clear_schedule(adapter);
 
 	/* reset the hardware with the new settings */
@@ -6955,6 +6953,9 @@ static int igc_probe(struct pci_dev *pdev,
 	/* Check if Media Autosense is enabled */
 	adapter->ei = *ei;
 
+	/* do hw tstamp init after resetting */
+	igc_ptp_init(adapter);
+
 	/* print pcie link status and MAC address */
 	pcie_print_link_status(pdev);
 	netdev_info(netdev, "MAC: %pM\n", netdev->dev_addr);
maintainer
#2 lore raw
Quoted 5 lines · Corinna Vinschen

Hi Sasha,

my patch should not go into the stable branches. Under certain circumstances it triggered kernel crashes.

Quoted 7 lines

Consequentially this patch has been reverted in the main development branch:

8eef5c3cea65 Revert "igc: fix a log entry using uninitialized netdev"

So I suggest to remove my patch 86167183a17e from the stable branches or apply 8eef5c3cea65 as well.

I've queued that up as well now.

thanks,

greg k-h

#3 lore raw
Quoted 9 lines · Greg KH
Quoted 8 lines · Corinna Vinschen

Hi Sasha,

my patch should not go into the stable branches. Under certain circumstances it triggered kernel crashes.

Consequentially this patch has been reverted in the main development branch:

Quoted 6 lines
Quoted 4 lines

8eef5c3cea65 Revert "igc: fix a log entry using uninitialized netdev"

So I suggest to remove my patch 86167183a17e from the stable branches or apply 8eef5c3cea65 as well.

I've queued that up as well now.

:+1:

Thanks,
Corinna

Quoted 4 lines

thanks,

greg k-h