mm/madvise: use mmap_sem lock from passed mm_struct
Use the mmap_sem lock from passed 'mm' rather than the 'current' as it is required because of the patchset[1]. The commit f4fa8d93 ("mm: madvise: fix vma user-after-free") changed the 'mmap_sem' to use from 'current' instead of 'mm' context. Revert it. Link: [1] https://patchwork.kernel.org/project/linux-mm/patch/20200302193630.68771-2-minchan@kernel.org/ . Change-Id: Ifc9deb2a5f0775c2bc97c85db3584f61fa3a43ae Signed-off-by:Charan Teja Reddy <charante@codeaurora.org> Signed-off-by:
Srinivasarao P <spathi@codeaurora.org>
Loading
Please register or sign in to comment