mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
gpu: ion: Check for null name argument
Add check for null argument to avoid dereferencing a null-pointer. Change-Id: Icb452d0764e375bf2684e013c51d260de98e8583 Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
This commit is contained in:
parent
8876e13360
commit
87d9a20aa2
1 changed files with 7 additions and 1 deletions
|
@ -931,7 +931,13 @@ struct ion_client *ion_client_create(struct ion_device *dev,
|
|||
struct rb_node *parent = NULL;
|
||||
struct ion_client *entry;
|
||||
pid_t pid;
|
||||
unsigned int name_len = strnlen(name, 64);
|
||||
unsigned int name_len;
|
||||
|
||||
if (!name) {
|
||||
pr_err("%s: Name cannot be null\n", __func__);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
name_len = strnlen(name, 64);
|
||||
|
||||
get_task_struct(current->group_leader);
|
||||
task_lock(current->group_leader);
|
||||
|
|
Loading…
Reference in a new issue