lkml.org 
[lkml]   [2018]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[BUG] net: e100: possible data races in e100_watchdog()
Date
The call paths in Linux 4.16.7 that may raise data races are:

CPU0:
e100_set_multicast_list
e100_exec_cb
line 879: spin_lock_irqsave()
e100_configure
line 1139: nic->flags [READ]
line 1148: nic->flags [READ]

CPU1:
e100_watchdog:
line 1758, 1756: nic->flags [WRITE]

The READ operations in CPU0 are performed with holding a spinlock (line
879), but the WRITE operation in CPU1 is performed without holding this
spinlock, so it may cause data races here.

A possible fix is to add spin_lock_irqsave() in e100_watchdog().
I am not sure that whether this possible fix is correct, so I only
report the data races.


Best wishes,
Jia-Ju Bai

\
 
 \ /
  Last update: 2018-06-27 03:32    [W:0.371 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site