From: Casey Schaufler Date: Fri, 6 Dec 2024 22:57:13 +0000 (-0800) Subject: binder: initialize lsm_context structure X-Git-Tag: v6.14-rc1~166^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=012920131013208186ce0ded0ef1c47fa67a70f6;p=thirdparty%2Flinux.git binder: initialize lsm_context structure It is possible to reach the end of binder_transaction() without having set lsmctx. As the variable value is checked there it needs to be initialized. Suggested-by: Kees Bakker [PM: subj tweak to fit convention] Signed-off-by: Casey Schaufler Signed-off-by: Paul Moore --- diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 919da8e674f55..a4b98e95ab854 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -3017,7 +3017,7 @@ static void binder_transaction(struct binder_proc *proc, struct binder_context *context = proc->context; int t_debug_id = atomic_inc_return(&binder_last_id); ktime_t t_start_time = ktime_get(); - struct lsm_context lsmctx; + struct lsm_context lsmctx = { }; struct list_head sgc_head; struct list_head pf_head; const void __user *user_buffer = (const void __user *)