diff options
| author | Pekka Paalanen <[email protected]> | 2009-02-24 19:44:15 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2009-03-02 09:20:37 +0000 |
| commit | 340430c572f7b2b275d39965e88bafa71693cb23 (patch) | |
| tree | 4be609589171a4bd8c5744178625454c6e5efa3a /scripts/unifdef.c | |
| parent | x86 mmiotrace: improve handling of secondary faults (diff) | |
| download | kernel-340430c572f7b2b275d39965e88bafa71693cb23.tar.gz kernel-340430c572f7b2b275d39965e88bafa71693cb23.zip | |
x86 mmiotrace: fix race with release_kmmio_fault_page()
There was a theoretical possibility to a race between arming a page in
post_kmmio_handler() and disarming the page in
release_kmmio_fault_page():
cpu0 cpu1
------------------------------------------------------------------
mmiotrace shutdown
enter release_kmmio_fault_page
fault on the page
disarm the page
disarm the page
handle the MMIO access
re-arm the page
put the page on release list
remove_kmmio_fault_pages()
fault on the page
page not known to mmiotrace
fall back to do_page_fault()
*KABOOM*
(This scenario also shows the double disarm case which is allowed.)
Fixed by acquiring kmmio_lock in post_kmmio_handler() and checking
if the page is being released from mmiotrace.
Signed-off-by: Pekka Paalanen <[email protected]>
Cc: Stuart Bennett <[email protected]>
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'scripts/unifdef.c')
0 files changed, 0 insertions, 0 deletions
