bpfilter: fix up a sparse annotation
authorChristoph Hellwig <hch@lst.de>
Thu, 23 Jul 2020 06:08:43 +0000 (08:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Jul 2020 22:41:53 +0000 (15:41 -0700)
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>
net/bpfilter/bpfilter_kern.c

index 2c31e82cb953af26badd724e6bbe3bc918625862..3bac5820062af195ea84fd42676a183774bcc6fb 100644 (file)
@@ -44,7 +44,7 @@ static int __bpfilter_process_sockopt(struct sock *sk, int optname,
        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.tgid)
                goto out;