mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
Merge "msm:adsprpc: Prevent use after free in fastrpc_set_process_info"
This commit is contained in:
commit
b0b7e93f35
1 changed files with 8 additions and 0 deletions
|
|
@ -5184,7 +5184,15 @@ static int fastrpc_set_process_info(struct fastrpc_file *fl)
|
|||
if (debugfs_root) {
|
||||
buf_size = strlen(current->comm) + strlen("_")
|
||||
+ strlen(strpid) + 1;
|
||||
|
||||
spin_lock(&fl->hlock);
|
||||
if (fl->debug_buf) {
|
||||
spin_unlock(&fl->hlock);
|
||||
return err;
|
||||
}
|
||||
fl->debug_buf = kzalloc(buf_size, GFP_KERNEL);
|
||||
spin_unlock(&fl->hlock);
|
||||
|
||||
if (!fl->debug_buf) {
|
||||
err = -ENOMEM;
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue