From: Anton Volkov <avolkov@ispras.ru>
To: marek.vasut@gmail.com, dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
ldv-project@linuxtesting.org,
Alexey Khoroshilov <khoroshilov@ispras.ru>
Subject: Possible race in ucb1400_ts.ko
Date: Tue, 15 Aug 2017 16:46:25 +0300 [thread overview]
Message-ID: <237b7e86-f8da-ae37-b56d-4786bbfaefc4@ispras.ru> (raw)
Hello.
While searching for races in the Linux kernel I've come across
"drivers/input/touchscreen/ucb1400_ts.ko" module. Here is a question
that I came up with while analyzing results. Lines are given using the
info from Linux v4.12.
Consider the following case:
Thread 1: Thread 2:
ucb1400_suspend
->ucb1400_ts_start
ucb->stopped = false
enable_irq()
ucb1400_resume
->ucb1400_ts_stop ucb1400_irq
ucb->stopped = true while(!ucb->stopped && ...)
(ucb1400_ts.c: line 230) (ucb1400_ts.c: line 202)
disable_irq()
The value of ucb->stopped may be changed in the midst of 'while' loop
iterations or prevent all of them from happening. Is this feasible from
your point of view? If so, is it a benign race or is it serious?
Thank you for your time.
-- Anton Volkov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: avolkov@ispras.ru
next reply other threads:[~2017-08-15 13:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 13:46 Anton Volkov [this message]
2017-08-15 18:14 ` Dmitry Torokhov
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=237b7e86-f8da-ae37-b56d-4786bbfaefc4@ispras.ru \
--to=avolkov@ispras.ru \
--cc=dmitry.torokhov@gmail.com \
--cc=khoroshilov@ispras.ru \
--cc=ldv-project@linuxtesting.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.vasut@gmail.com \
/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
all inboxes | Powered by JetHome®