lkml.org 
[lkml]   [2023]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 09/41] mm: rcu safe VMA freeing
    On Mon 09-01-23 12:53:04, Suren Baghdasaryan wrote:
    [...]
    > void vm_area_free(struct vm_area_struct *vma)
    > {
    > free_anon_vma_name(vma);
    > +#ifdef CONFIG_PER_VMA_LOCK
    > + call_rcu(&vma->vm_rcu, __vm_area_free);
    > +#else
    > kmem_cache_free(vm_area_cachep, vma);
    > +#endif

    Is it safe to have vma with already freed vma_name? I suspect this is
    safe because of mmap_lock but is there any reason to split the freeing
    process and have this potential UAF lurking?

    > }
    >
    > static void account_kernel_stack(struct task_struct *tsk, int account)
    > --
    > 2.39.0

    --
    Michal Hocko
    SUSE Labs

    \
     
     \ /
      Last update: 2023-03-26 23:44    [W:3.177 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site