From: Jeremy Fitzhardinge <jeremy@goop.org>
To: cpufreq@lists.linux.org.uk
Subject: Race in cpufreq_add_dev()?
Date: Thu, 06 Jul 2006 12:35:37 -0700 [thread overview]
Message-ID: <44AD6609.1080604@goop.org> (raw)
cpufreq_add_dev contains the test:
#ifdef CONFIG_SMP
/* check whether a different CPU already registered this
* CPU because it is in the same boat. */
policy = cpufreq_cpu_get(cpu);
if (unlikely(policy)) {
cpufreq_cpu_put(policy);
cpufreq_debug_enable_ratelimit();
return 0;
}
#endif
I don't see what prevents two CPUs from racing through here. Both could
perform this test and find that there's no policy for the CPU, and then
both will attempt to add it. Or is there something else which
serializes multiple CPUs through this code?
J
next reply other threads:[~2006-07-06 19:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 19:35 Jeremy Fitzhardinge [this message]
2006-10-03 0:27 ` Race in cpufreq_add_dev()? Dominik Brodowski
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=44AD6609.1080604@goop.org \
--to=jeremy@goop.org \
--cc=cpufreq@lists.linux.org.uk \
/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 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.