exo: Fix shm_pool_resize
When we migrated GpuMemoryBufferHandle to the new shared memory API we didn't take into account that the previous SharedMemoryHandle would not enforce the size of the shared memory region stayed the same, while UnsafeSharedMemoryRegion does. Before using UnsafeSharedMemoryRegion we could pass the handle, ignore shm_pool_resize and map to an offset that is out of the original size we created the pool with. This breaks with UnsafeSharedMemoryRegion that checks the region we're mapping is contained in size. This CL implements shm_pool_resize, adding protocol checks and recreating UnsafeSharedMemoryRegion with the proper new size. Bug: 961155 Change-Id: I443feca90ad332c40cb74f8a76182a20a565d7a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1608800 Commit-Queue: Daniele Castagna <dcastagna@chromium.org> Reviewed-by:Alex Ilin <alexilin@chromium.org> Cr-Commit-Position: refs/heads/master@{#660082}
Showing
Please register or sign in to comment