Skip to content

Commit

Permalink
bpfilter: fix up a sparse annotation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and David S. Miller committed Jul 24, 2020
1 parent 197569f commit e024e00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bpfilter/bpfilter_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e024e00

Please sign in to comment.