Mailinglist Archive: opensuse-bugs (6095 mails)

< Previous Next >
[Bug 1075876] Kernel Oops, null pointer dereference in timecounter_read
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 16 Apr 2018 06:44:55 +0000
  • Message-id: <>

--- Comment #6 from Takashi Iwai <tiwai@xxxxxxxx> ---
Sorry, I've overlooked the last update since I was on vacation.

So the crash comes at timercounter_read(), and it's likely an uninitialized
timecounter struct. Maybe e1000e_phc_gettime() gets called before
e1000e_phc_settime()? As far as I read the code, the driver initializes the
adapter->tc only at *_settime().

If my guess is correct, the fix would be to initialize adapter->tc at the
beginning, e.g.

diff --git a/drivers/net/ethernet/intel/e1000e/ptp.c
--- a/drivers/net/ethernet/intel/e1000e/ptp.c
+++ b/drivers/net/ethernet/intel/e1000e/ptp.c
@@ -324,6 +324,8 @@ void e1000e_ptp_init(struct e1000_adapter *adapter)

+ timecounter_init(&adapter->tc, &adapter->cc, 0);

You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >