Loading drivers/char/diag/diagchar_core.c +17 −0 Original line number Diff line number Diff line Loading @@ -654,6 +654,11 @@ static void diag_cmd_invalidate_polling(int change_flag) driver->polling_reg_flag = 0; list_for_each_safe(start, temp, &driver->cmd_reg_list) { item = list_entry(start, struct diag_cmd_reg_t, link); if (&item->entry == NULL) { pr_err("diag: In %s, unable to search command\n", __func__); return; } polling = diag_cmd_chk_polling(&item->entry); if (polling == DIAG_CMD_POLLING) { driver->polling_reg_flag = 1; Loading Loading @@ -793,6 +798,12 @@ void diag_cmd_remove_reg_by_pid(int pid) mutex_lock(&driver->cmd_reg_mutex); list_for_each_safe(start, temp, &driver->cmd_reg_list) { item = list_entry(start, struct diag_cmd_reg_t, link); if (&item->entry == NULL) { pr_err("diag: In %s, unable to search command\n", __func__); mutex_unlock(&driver->cmd_reg_mutex); return; } if (item->pid == pid) { list_del(&item->link); kfree(item); Loading @@ -811,6 +822,12 @@ void diag_cmd_remove_reg_by_proc(int proc) mutex_lock(&driver->cmd_reg_mutex); list_for_each_safe(start, temp, &driver->cmd_reg_list) { item = list_entry(start, struct diag_cmd_reg_t, link); if (&item->entry == NULL) { pr_err("diag: In %s, unable to search command\n", __func__); mutex_unlock(&driver->cmd_reg_mutex); return; } if (item->proc == proc) { list_del(&item->link); kfree(item); Loading Loading
drivers/char/diag/diagchar_core.c +17 −0 Original line number Diff line number Diff line Loading @@ -654,6 +654,11 @@ static void diag_cmd_invalidate_polling(int change_flag) driver->polling_reg_flag = 0; list_for_each_safe(start, temp, &driver->cmd_reg_list) { item = list_entry(start, struct diag_cmd_reg_t, link); if (&item->entry == NULL) { pr_err("diag: In %s, unable to search command\n", __func__); return; } polling = diag_cmd_chk_polling(&item->entry); if (polling == DIAG_CMD_POLLING) { driver->polling_reg_flag = 1; Loading Loading @@ -793,6 +798,12 @@ void diag_cmd_remove_reg_by_pid(int pid) mutex_lock(&driver->cmd_reg_mutex); list_for_each_safe(start, temp, &driver->cmd_reg_list) { item = list_entry(start, struct diag_cmd_reg_t, link); if (&item->entry == NULL) { pr_err("diag: In %s, unable to search command\n", __func__); mutex_unlock(&driver->cmd_reg_mutex); return; } if (item->pid == pid) { list_del(&item->link); kfree(item); Loading @@ -811,6 +822,12 @@ void diag_cmd_remove_reg_by_proc(int proc) mutex_lock(&driver->cmd_reg_mutex); list_for_each_safe(start, temp, &driver->cmd_reg_list) { item = list_entry(start, struct diag_cmd_reg_t, link); if (&item->entry == NULL) { pr_err("diag: In %s, unable to search command\n", __func__); mutex_unlock(&driver->cmd_reg_mutex); return; } if (item->proc == proc) { list_del(&item->link); kfree(item); Loading