|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [XEN] Remove a race condition in shadow m
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1172843199 0
# Node ID a69d98bf0c5570f9157a95155f25d62b0ff76608
# Parent 3ac19fda0bc256bac20a4decf7e13bb086162220
[XEN] Remove a race condition in shadow mark_dirty code.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
xen/arch/x86/mm/shadow/common.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletion(-)
diff -r 3ac19fda0bc2 -r a69d98bf0c55 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c Fri Mar 02 12:11:52 2007 +0000
+++ b/xen/arch/x86/mm/shadow/common.c Fri Mar 02 13:46:39 2007 +0000
@@ -2912,7 +2912,16 @@ void sh_mark_dirty(struct domain *d, mfn
* can be called from __hvm_copy during emulation).
* If the lock isn't held, take it for the duration of the call. */
do_locking = !shadow_locked_by_me(d);
- if ( do_locking ) shadow_lock(d);
+ if ( do_locking )
+ {
+ shadow_lock(d);
+ /* Check the mode again with the lock held */
+ if ( unlikely(!shadow_mode_log_dirty(d)) )
+ {
+ shadow_unlock(d);
+ return;
+ }
+ }
ASSERT(d->arch.paging.shadow.dirty_bitmap != NULL);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [XEN] Remove a race condition in shadow mark_dirty code.,
Xen patchbot-unstable <=
|
|
|
|
|