[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] mem_sharing: fix race condition of nominate and unshare
Hi, this patch does the following (1) When updating/checking p2m type for mem_sharing, we must hold shr_lock (2) For nominate operation, if the page is already nominated, return the handle from page_info->shr_handle (3) For unshare operation, it is possible that multiple users unshare a page via hvm_hap_nested_page_fault() at the same time. If the page is already un-shared by someone else, simply return success. NOTE: we assume that nobody holds page_alloc_lock/p2m_lock before calling nominate/share/unshare. Signed-off-by: Jui-Hao Chiang <juihaochiang@xxxxxxxxx> Signed-off-by: Han-Lin Li <Han-Lin.Li@xxxxxxxxxxx> Bests, Jui-Hao Attachment:
mem_sharing_p2mt_race.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |