Blob Blame History Raw
From: Christoph Hellwig <hch@lst.de>
Date: Thu, 23 Jul 2020 08:08:43 +0200
Subject: bpfilter: fix up a sparse annotation
Patch-mainline: v5.9-rc1
Git-commit: e024e008186bf9f4109c86b66dd60d0f926bc1fb
References: bsc#1155518

The __user doesn't make sense when casting to an integer type, just
switch to a uintptr_t cast which also removes the need for the __force.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Gary Lin <glin@suse.com>
---
 net/bpfilter/bpfilter_kern.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/bpfilter/bpfilter_kern.c
+++ b/net/bpfilter/bpfilter_kern.c
@@ -46,7 +46,7 @@ static int __bpfilter_process_sockopt(st
 	req.is_set = is_set;
 	req.pid = current->pid;
 	req.cmd = optname;
-	req.addr = (long __force __user)optval;
+	req.addr = (uintptr_t)optval;
 	req.len = optlen;
 	if (!bpfilter_ops.info.pid)
 		goto out;