From: "홍신 shin hong" <hongshin@gmail.com>
To: linux-mtd@lists.infradead.org
Subject: a suspected data race in /driver/mtd/ubi/build.c
Date: Tue, 19 May 2009 20:34:17 +0900 [thread overview]
Message-ID: <2014bcab0905190434r687de23ued2af901636cd16c@mail.gmail.com> (raw)
Hi. I am reporting a susptected data race bug at
ubi_attach_mtd_dev() in /driver/mtd/ubi/build.c .
This function creates a kernel thread by calling
kthread_create(ubi_thread, ubi .. ). and then
it assigns ubi->thread_enabled = 1.
However, ubi_thread() also reads ubi->thread_enabled.
This may cause data race since the execution results
would be differ depending on the scheduling.
I think, ubi_attach_mtd_dev() should be modified to protect
the writing aceess to ubi->thread_enabled
by spin_lock(&ubi->wl_lock).
But I do not have much background on the code.
So please check this code and let me know your opinions.
Thanks.
Sincerely
Shin Hong
next reply other threads:[~2009-05-19 11:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 11:34 홍신 shin hong [this message]
2009-05-23 8:58 ` a suspected data race in /driver/mtd/ubi/build.c Artem Bityutskiy
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=2014bcab0905190434r687de23ued2af901636cd16c@mail.gmail.com \
--to=hongshin@gmail.com \
--cc=linux-mtd@lists.infradead.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