drm/amdkfd: fix some range checks in address watch ioctl
buf_size_in_bytes must be large enough to hold ->num_watch_points and watch_mode so I have added a sizeof(int) * 2 to the minimum size. Also we have to subtract sizeof(*args) from the max args_idx limit so that it matches the allocation. Also I changed a > to >= for the last compare. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
Showing
想要评论请 注册 或 登录