From: Bart Van Assche Date: Wed, 27 Mar 2019 23:50:45 +0000 (-0700) Subject: RDMA/uverbs: Add a __user annotation to a pointer X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=259e66bcdff59b5d92b8f43e42237aaea2c4d457;p=openwrt%2Fstaging%2Fblogic.git 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 Fixes: 3a6532c9af1a ("RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write") Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 70b7d80431a9..b8fc5a329e21 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -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;