RDMA/uverbs: Add a __user annotation to a pointer

This patch avoids that sparse and smatch report the following:

  warning: cast removes address space of expression

Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Fixes: 3a6532c9af ("RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Bart Van Assche 2019-03-27 16:50:45 -07:00 коммит произвёл Jason Gunthorpe
Родитель 08304d7146
Коммит 259e66bcdf
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -720,7 +720,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,
* then the command request structure starts
* with a '__aligned u64 response' member.
*/
ret = get_user(response, (const u64 *)buf);
ret = get_user(response, (const u64 __user *)buf);
if (ret)
goto out_unlock;