Re: [PATCH hotfix 6.12 v3 4/5] mm: refactor arch_validate_flags() and arm64 MTE handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 29, 2024 at 09:08:22AM -0700, Yang Shi wrote:
> On Tue, Oct 29, 2024 at 8:52 AM Lorenzo Stoakes
> <lorenzo.stoakes@xxxxxxxxxx> wrote:
> >
> > On Tue, Oct 29, 2024 at 08:43:04AM -0700, Yang Shi wrote:
> >
> > >
> > > Sorry for chiming in late. This looks problematic IIUC. The patch 5/5
> > > moved arch_validate_flags() before call_mmap() as the commit log said.
> > > But shmem_file() does this check:
> > > mapping->a_ops == &shmem_aops
> > >
> > > But mapping->a_ops is not initialized until shmem_mmap(), which is
> > > called by call_mmap().
> > >
> > > So shmem_file() should always return false here. Did I miss something?
> >
> > Well firstly this is tested and works so you did miss something :)
> >
> > Bu shmem_mmap() is not setting mapping->a_ops, it's setting vma->vm_ops.
> >
> > __shmem_get_inode() and shmem_symlink() set mapping->a_ops.
>
> My bad, stared at "_ops", but missed "vm" prefix. And shmem_mmap()
> can't touch a_ops. Sorry for the disruption.

No worries, the various ops are quite confusing and precisely where what
happens, I had to double check this myself... :)




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux