[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] xen/gntdev: Fix partial gntdev_mmap() cleanup
On 01/10/2018 01:22 AM, Boris Ostrovsky wrote: On 01/09/2018 07:10 AM, Ross Lagerwall wrote:When cleaning up after a partially successful gntdev_mmap(), unmap the successfully mapped grant pages otherwise Xen will kill the domain if in debug mode (Attempt to implicitly unmap a granted PTE) or Linux will kill the process and emit "BUG: Bad page map in process" if Xen is in release mode. This is only needed when use_ptemod is true because gntdev_put_map() will unmap grant pages itself when use_ptemod is false. Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>although I wonder whether it may be possible to have gntdev_put_map() figure whether to unmap the pages if use_ptemod is set. It was a while since I wrote this patch, but IIRC when use_ptemod is set, successfully mmapped pages are unmapped via the mmu_notifier release callback. So doing it in gntdev_put_map() isn't possible without further changes. -- Ross Lagerwall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |