Loading drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c +22 −3 Original line number Diff line number Diff line Loading @@ -2317,9 +2317,15 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev, struct msm_camera_v4l2_ioctl_t *ioctl_ptr) { struct msm_cpp_frame_info_t *frame = NULL; struct msm_cpp_frame_info_t *u_frame_info = (struct msm_cpp_frame_info_t *)ioctl_ptr->ioctl_ptr; struct msm_cpp_frame_info_t k_frame_info; int32_t rc = 0; int32_t i = 0; int32_t num_buff = sizeof(k_frame_info.output_buffer_info)/ sizeof(struct msm_cpp_buffer_info_t); if (copy_from_user(&k_frame_info, (void __user *)ioctl_ptr->ioctl_ptr, sizeof(k_frame_info))) return -EFAULT; frame = msm_cpp_get_frame(ioctl_ptr); if (!frame) { Loading @@ -2327,14 +2333,27 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev, rc = -EINVAL; } else { rc = msm_cpp_cfg_frame(cpp_dev, frame); if (rc >= 0) { for (i = 0; i < num_buff; i++) { k_frame_info.output_buffer_info[i] = frame->output_buffer_info[i]; } } } ioctl_ptr->trans_code = rc; if (copy_to_user((void __user *)u_frame_info->status, &rc, if (copy_to_user((void __user *)k_frame_info.status, &rc, sizeof(int32_t))) pr_err("error cannot copy error\n"); if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, &k_frame_info, sizeof(k_frame_info))) { pr_err("Error: cannot copy k_frame_info"); return -EFAULT; } return rc; } Loading Loading
drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c +22 −3 Original line number Diff line number Diff line Loading @@ -2317,9 +2317,15 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev, struct msm_camera_v4l2_ioctl_t *ioctl_ptr) { struct msm_cpp_frame_info_t *frame = NULL; struct msm_cpp_frame_info_t *u_frame_info = (struct msm_cpp_frame_info_t *)ioctl_ptr->ioctl_ptr; struct msm_cpp_frame_info_t k_frame_info; int32_t rc = 0; int32_t i = 0; int32_t num_buff = sizeof(k_frame_info.output_buffer_info)/ sizeof(struct msm_cpp_buffer_info_t); if (copy_from_user(&k_frame_info, (void __user *)ioctl_ptr->ioctl_ptr, sizeof(k_frame_info))) return -EFAULT; frame = msm_cpp_get_frame(ioctl_ptr); if (!frame) { Loading @@ -2327,14 +2333,27 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev, rc = -EINVAL; } else { rc = msm_cpp_cfg_frame(cpp_dev, frame); if (rc >= 0) { for (i = 0; i < num_buff; i++) { k_frame_info.output_buffer_info[i] = frame->output_buffer_info[i]; } } } ioctl_ptr->trans_code = rc; if (copy_to_user((void __user *)u_frame_info->status, &rc, if (copy_to_user((void __user *)k_frame_info.status, &rc, sizeof(int32_t))) pr_err("error cannot copy error\n"); if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, &k_frame_info, sizeof(k_frame_info))) { pr_err("Error: cannot copy k_frame_info"); return -EFAULT; } return rc; } Loading