diff options
| author | Christoph Hellwig <[email protected]> | 2020-07-23 06:09:07 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2020-07-24 22:41:54 +0000 |
| commit | a7b75c5a8c41445f33efb663887ff5f5c3b4454b (patch) | |
| tree | a87e011ba3a0d76fda030b3a62080caa97fae1ef /drivers/isdn/mISDN/socket.c | |
| parent | net/tcp: switch do_tcp_setsockopt to sockptr_t (diff) | |
| download | kernel-a7b75c5a8c41445f33efb663887ff5f5c3b4454b.tar.gz kernel-a7b75c5a8c41445f33efb663887ff5f5c3b4454b.zip | |
net: pass a sockptr_t into ->setsockopt
Rework the remaining setsockopt code to pass a sockptr_t instead of a
plain user pointer. This removes the last remaining set_fs(KERNEL_DS)
outside of architecture specific code.
Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Stefan Schmidt <[email protected]> [ieee802154]
Acked-by: Matthieu Baerts <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/isdn/mISDN/socket.c')
| -rw-r--r-- | drivers/isdn/mISDN/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index 1b2b91479107..2835daae9e9f 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c @@ -401,7 +401,7 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) } static int data_sock_setsockopt(struct socket *sock, int level, int optname, - char __user *optval, unsigned int len) + sockptr_t optval, unsigned int len) { struct sock *sk = sock->sk; int err = 0, opt = 0; @@ -414,7 +414,7 @@ static int data_sock_setsockopt(struct socket *sock, int level, int optname, switch (optname) { case MISDN_TIME_STAMP: - if (get_user(opt, (int __user *)optval)) { + if (copy_from_sockptr(&opt, optval, sizeof(int))) { err = -EFAULT; break; } |
