[PATCH] lsm: constify the 'mm' parameter in security_vm_enough_memory_mm()

Paul Moore paul at paul-moore.com
Wed Sep 13 22:01:40 UTC 2023


On Wed, Aug 23, 2023 at 8:07 AM Matthew Wilcox <willy at infradead.org> wrote:
> On Wed, Aug 23, 2023 at 11:53:57AM +0500, Khadija Kamran wrote:
> > +++ b/include/linux/mm.h
> > @@ -3064,7 +3064,7 @@ void anon_vma_interval_tree_verify(struct anon_vma_chain *node);
> >            avc; avc = anon_vma_interval_tree_iter_next(avc, start, last))
> >
> >  /* mmap.c */
> > -extern int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin);
> > +extern int __vm_enough_memory(const struct mm_struct *mm, long pages, int cap_sys_admin);
>
> Could you remove the 'extern' when you touch a function prototype?

Khadija, can you please make the change Matthew is requesting?

-- 
paul-moore.com



More information about the Linux-security-module-archive mailing list