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 <hch@lst.de> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org> [ieee802154] Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d38d2b00ba
commit
a7b75c5a8c
@@ -21,6 +21,7 @@
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/once.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sockptr.h>
|
||||
|
||||
#include <uapi/linux/net.h>
|
||||
|
||||
@@ -162,7 +163,8 @@ struct proto_ops {
|
||||
int (*listen) (struct socket *sock, int len);
|
||||
int (*shutdown) (struct socket *sock, int flags);
|
||||
int (*setsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, unsigned int optlen);
|
||||
int optname, sockptr_t optval,
|
||||
unsigned int optlen);
|
||||
int (*getsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, int __user *optlen);
|
||||
void (*show_fdinfo)(struct seq_file *m, struct socket *sock);
|
||||
|
Reference in New Issue
Block a user