Re: [PATCH] ovl: fix mmap denywrite
From: Miklos Szeredi <miklos@szeredi.hu>
Date: 2021-06-22 15:10:30
Also in:
linux-fsdevel, linux-mm
From: Miklos Szeredi <miklos@szeredi.hu>
Date: 2021-06-22 15:10:30
Also in:
linux-fsdevel, linux-mm
On Tue, 22 Jun 2021 at 14:43, Christian König [off-list ref] wrote:
Am 22.06.21 um 14:30 schrieb Miklos Szeredi:quoted
Overlayfs did not honor positive i_writecount on realfile for VM_DENYWRITE mappings. Similarly negative i_mmap_writable counts were ignored for VM_SHARED mappings. Fix by making vma_set_file() switch the temporary counts obtained and released by mmap_region().Mhm, I don't fully understand the background but that looks like something specific to overlayfs to me. So why are you changing the common helper?
Need to hold the temporary counts until the final ones are obtained in vma_link(), which is out of overlayfs' scope. Thanks, Miklos