Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <kees@ijzerbout.nl>
[PM: subj tweak to fit convention]
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>

authored by

Casey Schaufler and committed by
Paul Moore
01292013 9c76eaf7

+1 -1
+1 -1
drivers/android/binder.c
··· 3017 3017 struct binder_context *context = proc->context; 3018 3018 int t_debug_id = atomic_inc_return(&binder_last_id); 3019 3019 ktime_t t_start_time = ktime_get(); 3020 - struct lsm_context lsmctx; 3020 + struct lsm_context lsmctx = { }; 3021 3021 struct list_head sgc_head; 3022 3022 struct list_head pf_head; 3023 3023 const void __user *user_buffer = (const void __user *)