diff options
author | Christoph Hellwig <hch@lst.de> | 2020-07-23 08:08:55 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-25 00:41:54 +0200 |
commit | b03afaa82ece13b2a008f0e3a7127bead578e3e6 (patch) | |
tree | d34d7c6c990946d126e74053cdd8d37291dbe48e /net/ipv4/ip_sockglue.c | |
parent | netfilter: switch nf_setsockopt to sockptr_t (diff) | |
download | linux-b03afaa82ece13b2a008f0e3a7127bead578e3e6.tar.xz linux-b03afaa82ece13b2a008f0e3a7127bead578e3e6.zip |
bpfilter: switch bpfilter_ip_set_sockopt to sockptr_t
This is mostly to prepare for cleaning up the callers, as bpfilter by
design can't handle kernel pointers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 42befbf12846..36f746e01741 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -1414,7 +1414,8 @@ int ip_setsockopt(struct sock *sk, int level, #if IS_ENABLED(CONFIG_BPFILTER_UMH) if (optname >= BPFILTER_IPT_SO_SET_REPLACE && optname < BPFILTER_IPT_SET_MAX) - err = bpfilter_ip_set_sockopt(sk, optname, optval, optlen); + err = bpfilter_ip_set_sockopt(sk, optname, USER_SOCKPTR(optval), + optlen); #endif #ifdef CONFIG_NETFILTER /* we need to exclude all possible ENOPROTOOPTs except default case */ |