Re: [PATCH v2] drm/vmwgfx: Protect pin_user_pages with mmap_lock

2022-11-07 Thread Martin Krastev (VMware)
From: Martin Krastev Thanks for the catch. LGTM, with the following remarks: 1) Original design used erroneously pin_user_pages() in place of pin_user_pages_fast(); you could just substitute pin_user_pages for pin_user_pages_fast and call it a day, Please, consider that option after readi

[PATCH v2] drm/vmwgfx: Protect pin_user_pages with mmap_lock

2022-11-06 Thread Dawei Li
This patch includes changes below: 1) pin_user_pages() is unsafe without protection of mmap_lock, fix it by calling mmap_read_lock() & mmap_read_unlock(). 2) fix & refactor the incorrect exception handling procedure in vmw_mksstat_add_ioctl(). Fixes: 7a7a933edd6c ("drm/vmwgfx: Introduce VMwa