From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: jeffrey.t.kirsher@intel.com, jchapman@katalix.com
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [BUG] net: e100: possible data races in e100_watchdog()
Date: Wed, 27 Jun 2018 09:30:51 +0800 [thread overview]
Message-ID: <ecf9293b-9105-8eb1-7184-77de6dd77786@gmail.com> (raw)
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
reply other threads:[~2018-06-27 1:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ecf9293b-9105-8eb1-7184-77de6dd77786@gmail.com \
--to=baijiaju1990@gmail.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jchapman@katalix.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox