x86/modules: Set VM_FLUSH_RESET_PERMS in module_alloc()

Instead of resetting permissions all over the place when freeing module
memory tell the vmalloc code to do so. Avoids the exercise for the next
upcoming user.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220915111143.406703869@infradead.org
This commit is contained in:
Thomas Gleixner 2022-09-15 13:10:44 +02:00 • committed by Peter Zijlstra
commit 4c4eb3ecc9
3 changed files with 5 additions and 7 deletions