linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/nommu: unexport do_munmap()
@ 2021-06-04 19:40 Liam Howlett
  2021-06-05 14:36 ` Matthew Wilcox
  2021-06-09 11:18 ` David Hildenbrand
  0 siblings, 2 replies; 3+ messages in thread
From: Liam Howlett @ 2021-06-04 19:40 UTC (permalink / raw)
  To: linux-mm, linux-kernel, Andrew Morton

do_munmap() does not take the mmap_write_lock().  vm_munmap() should be
used instead.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
---
 mm/nommu.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/nommu.c b/mm/nommu.c
index 0997ca38c2bd..3a93d4054810 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1501,7 +1501,6 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len, struct list
 	delete_vma(mm, vma);
 	return 0;
 }
-EXPORT_SYMBOL(do_munmap);
 
 int vm_munmap(unsigned long addr, size_t len)
 {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/nommu: unexport do_munmap()
  2021-06-04 19:40 [PATCH] mm/nommu: unexport do_munmap() Liam Howlett
@ 2021-06-05 14:36 ` Matthew Wilcox
  2021-06-09 11:18 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2021-06-05 14:36 UTC (permalink / raw)
  To: Liam Howlett; +Cc: linux-mm, linux-kernel, Andrew Morton

On Fri, Jun 04, 2021 at 07:40:16PM +0000, Liam Howlett wrote:
> do_munmap() does not take the mmap_write_lock().  vm_munmap() should be
> used instead.

also, do_munmap was unexported for MMU builds back in 2012 by commit
17d1587f553d.

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

> Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
> ---
>  mm/nommu.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/nommu.c b/mm/nommu.c
> index 0997ca38c2bd..3a93d4054810 100644
> --- a/mm/nommu.c
> +++ b/mm/nommu.c
> @@ -1501,7 +1501,6 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len, struct list
>  	delete_vma(mm, vma);
>  	return 0;
>  }
> -EXPORT_SYMBOL(do_munmap);
>  
>  int vm_munmap(unsigned long addr, size_t len)
>  {
> -- 
> 2.30.2
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/nommu: unexport do_munmap()
  2021-06-04 19:40 [PATCH] mm/nommu: unexport do_munmap() Liam Howlett
  2021-06-05 14:36 ` Matthew Wilcox
@ 2021-06-09 11:18 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2021-06-09 11:18 UTC (permalink / raw)
  To: Liam Howlett, linux-mm, linux-kernel, Andrew Morton

On 04.06.21 21:40, Liam Howlett wrote:
> do_munmap() does not take the mmap_write_lock().  vm_munmap() should be
> used instead.
> 
> Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
> ---
>   mm/nommu.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/mm/nommu.c b/mm/nommu.c
> index 0997ca38c2bd..3a93d4054810 100644
> --- a/mm/nommu.c
> +++ b/mm/nommu.c
> @@ -1501,7 +1501,6 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len, struct list
>   	delete_vma(mm, vma);
>   	return 0;
>   }
> -EXPORT_SYMBOL(do_munmap);
>   
>   int vm_munmap(unsigned long addr, size_t len)
>   {
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-09 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 19:40 [PATCH] mm/nommu: unexport do_munmap() Liam Howlett
2021-06-05 14:36 ` Matthew Wilcox
2021-06-09 11:18 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).