Re: [PATCH] arch/m68k/kernel/sys_m68k: Add missing mmap_read_lock() to sys_cacheflush()
From: Matthew Wilcox
Date: Thu Apr 08 2021 - 12:38:42 EST
On Thu, Apr 08, 2021 at 04:34:20PM +0000, Liam Howlett wrote:
> When the superuser flushes the entire cache, the mmap_read_lock() is not
> taken, but mmap_read_unlock() is called. Add the missing
> mmap_read_lock() call.
>
> Fixes: cd2567b6850b (m68k: call find_vma with the mmap_sem held in
> sys_cacheflush())
> Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
Although if it's been broken since 2014, maybe the ability of the
superuser to flush the entire cache is not needed any more and can
be removed?