All of lore.kernel.org
 help / color / mirror / Atom feed
* [REPORT] net: e1000e: possible data races
@ 2018-10-03 13:18 ` Jia-Ju Bai
  0 siblings, 0 replies; 2+ messages in thread
From: Jia-Ju Bai @ 2018-10-03 13:18 UTC (permalink / raw)
  To: jeffrey.t.kirsher, davem
  Cc: intel-wired-lan, netdev, Linux Kernel Mailing List

CPU0:
e1000e_get_stats64
     line 5944: spin_lock()
     e1000e_update_stats
         line 4949: hw->mac.tx_packet_delta = er32(TPT); [WRITE]

CPU1:
e1000_watchdog_task
     e1000e_update_adaptive
         line 1762: mac->tx_packet_delta [READ]
         line 1763: mac->tx_packet_delta [READ]
         line 1776: mac->tx_packet_delta [READ]

As for mac->tx_packet_delta, the WRITE operation in CPU0 is performed
with holding a spinlock, but the READ operations in CPU1 are performed
without holding this spinlock, so there may exist data races.

These possible races are detected by a runtime testing.
I do not find a good way to fix these races, so I only report them.


Best wishes,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Intel-wired-lan] [REPORT] net: e1000e: possible data races
@ 2018-10-03 13:18 ` Jia-Ju Bai
  0 siblings, 0 replies; 2+ messages in thread
From: Jia-Ju Bai @ 2018-10-03 13:18 UTC (permalink / raw)
  To: intel-wired-lan

CPU0:
e1000e_get_stats64
     line 5944: spin_lock()
     e1000e_update_stats
         line 4949: hw->mac.tx_packet_delta = er32(TPT); [WRITE]

CPU1:
e1000_watchdog_task
     e1000e_update_adaptive
         line 1762: mac->tx_packet_delta [READ]
         line 1763: mac->tx_packet_delta [READ]
         line 1776: mac->tx_packet_delta [READ]

As for mac->tx_packet_delta, the WRITE operation in CPU0 is performed
with holding a spinlock, but the READ operations in CPU1 are performed
without holding this spinlock, so there may exist data races.

These possible races are detected by a runtime testing.
I do not find a good way to fix these races, so I only report them.


Best wishes,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-03 13:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-03 13:18 [REPORT] net: e1000e: possible data races Jia-Ju Bai
2018-10-03 13:18 ` [Intel-wired-lan] " Jia-Ju Bai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.