From 75617df5b35d4f47663d57605d4a0922837c7708 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Thu, 16 Dec 2021 09:05:43 -0800 Subject: [PATCH] ANDROID: Fix mmu_notifier_trylock definition for !CONFIG_MMU_NOTIFIER config mmu_notifier_trylock definition for CONFIG_MMU_NOTIFIER=n configuration has not been modified from the older version. Correct that mistake. Fixes: 6971350406a3 ("ANDROID: fix mmu_notifier race caused by not taking mmap_lock during SPF") Bug: 161210518 Signed-off-by: Suren Baghdasaryan Change-Id: I71b8644bd2864b6ed98a7ff9c15a99fbd4c5a6c5 --- include/linux/mmu_notifier.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index 15c77675ca33..2c6567b60198 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -796,8 +796,9 @@ static inline void mmu_notifier_subscriptions_destroy(struct mm_struct *mm) { } -static inline void mmu_notifier_lock(struct mm_struct *mm) +static inline bool mmu_notifier_trylock(struct mm_struct *mm) { + return true; } static inline void mmu_notifier_unlock(struct mm_struct *mm)