ANDROID: GKI: Add initialization for mutex oem_data.
Although __mutex_init() already contains a hook, but this
function may be called before the mutex_init hook is registered,
causing mutex's oem_data to be uninitialized and causing unpredictable errors.
Bug: 352181884
Change-Id: I04378d6668fb4e7b93c11d930ac46aae484fc835
Signed-off-by: zhujingpeng <zhujingpeng@vivo.com>
(cherry picked from commit 96d66062d0767aeafb690ce014ec91785820d62b)
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 5636c8ba..00ba9bc 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -50,6 +50,7 @@
#ifdef CONFIG_MUTEX_SPIN_ON_OWNER
osq_lock_init(&lock->osq);
#endif
+ android_init_oem_data(lock, 1);
trace_android_vh_mutex_init(lock);
debug_mutex_init(lock, name, key);