Loading drivers/char/diag/diag_masks.c +3 −3 Original line number Diff line number Diff line Loading @@ -1206,7 +1206,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len, int rsp_header_len = sizeof(struct diag_log_config_rsp_t); uint32_t mask_size = 0; struct diag_log_mask_t *log_item = NULL; struct diag_log_config_req_t *req; struct diag_log_config_get_req_t *req; struct diag_log_config_rsp_t rsp; struct diag_mask_info *mask_info = NULL; struct diag_md_session_t *info = NULL; Loading @@ -1216,7 +1216,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len, mask_info = (!info) ? &log_mask : info->log_mask; if (!src_buf || !dest_buf || dest_len <= 0 || !mask_info || src_len < sizeof(struct diag_log_config_req_t)) { src_len < sizeof(struct diag_log_config_get_req_t)) { pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n", __func__, src_buf, src_len, dest_buf, dest_len, mask_info); Loading @@ -1235,7 +1235,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len, return 0; } req = (struct diag_log_config_req_t *)src_buf; req = (struct diag_log_config_get_req_t *)src_buf; read_len += req_header_len; rsp.cmd_code = DIAG_CMD_LOG_CONFIG; Loading drivers/char/diag/diag_masks.h +8 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2015, 2017-2018 The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2015, 2017-2019 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -40,6 +40,13 @@ struct diag_msg_mask_t { uint32_t *ptr; }; struct diag_log_config_get_req_t { uint8_t cmd_code; uint8_t padding[3]; uint32_t sub_cmd; uint32_t equip_id; } __packed; struct diag_log_config_req_t { uint8_t cmd_code; uint8_t padding[3]; Loading Loading
drivers/char/diag/diag_masks.c +3 −3 Original line number Diff line number Diff line Loading @@ -1206,7 +1206,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len, int rsp_header_len = sizeof(struct diag_log_config_rsp_t); uint32_t mask_size = 0; struct diag_log_mask_t *log_item = NULL; struct diag_log_config_req_t *req; struct diag_log_config_get_req_t *req; struct diag_log_config_rsp_t rsp; struct diag_mask_info *mask_info = NULL; struct diag_md_session_t *info = NULL; Loading @@ -1216,7 +1216,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len, mask_info = (!info) ? &log_mask : info->log_mask; if (!src_buf || !dest_buf || dest_len <= 0 || !mask_info || src_len < sizeof(struct diag_log_config_req_t)) { src_len < sizeof(struct diag_log_config_get_req_t)) { pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n", __func__, src_buf, src_len, dest_buf, dest_len, mask_info); Loading @@ -1235,7 +1235,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len, return 0; } req = (struct diag_log_config_req_t *)src_buf; req = (struct diag_log_config_get_req_t *)src_buf; read_len += req_header_len; rsp.cmd_code = DIAG_CMD_LOG_CONFIG; Loading
drivers/char/diag/diag_masks.h +8 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2015, 2017-2018 The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2015, 2017-2019 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -40,6 +40,13 @@ struct diag_msg_mask_t { uint32_t *ptr; }; struct diag_log_config_get_req_t { uint8_t cmd_code; uint8_t padding[3]; uint32_t sub_cmd; uint32_t equip_id; } __packed; struct diag_log_config_req_t { uint8_t cmd_code; uint8_t padding[3]; Loading