From 1add9f7a56e43099c23f6ba9409278116ea1c964 Mon Sep 17 00:00:00 2001 From: James Morris Date: Mon, 2 Sep 2002 22:40:11 -0700 Subject: [PATCH] sigio/sigurg cleanup for 2.5.32 This is a cleanup of the sigio/sigurg code. Summary: o Removed sk->proc, SIGURG now sent via vfs, credentials checked during delivery. o SIOCSPGRP etc. ioctls use vfs, and work now for SIGIO as well as SIGURG. o Removed socket fcntl code. o Consolidate lsm file_set_fowner() hooks. o Fixed fowner race. o Fixed associated mainline memory leak in fcntl_dirnotify(). --- include/linux/fs.h | 5 +++++ include/net/inet_common.h | 3 --- include/net/sock.h | 5 +---- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/linux/fs.h b/include/linux/fs.h index 598561bc18c2..befc2bbb5f3c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -432,6 +432,7 @@ static inline struct inode *SOCK_INODE(struct socket *socket) #include struct fown_struct { + rwlock_t lock; /* protects pid, uid, euid fields */ int pid; /* pid or -pgrp where SIGIO should be sent */ uid_t uid, euid; /* uid/euid of process setting the owner */ int signum; /* posix.1b rt signal to be delivered on IO */ @@ -615,6 +616,10 @@ extern void kill_fasync(struct fasync_struct **, int, int); /* only for net: no internal synchronization */ extern void __kill_fasync(struct fasync_struct *, int, int); +extern int f_setown(struct file *filp, unsigned long arg, int force); +extern void f_delown(struct file *filp); +extern int send_sigurg(struct fown_struct *fown); + /* * Umount options */ diff --git a/include/net/inet_common.h b/include/net/inet_common.h index 87b3fd324347..4d9ae09958d3 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h @@ -34,9 +34,6 @@ extern int inet_setsockopt(struct socket *sock, int level, extern int inet_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen); -extern int inet_fcntl(struct socket *sock, - unsigned int cmd, - unsigned long arg); extern int inet_listen(struct socket *sock, int backlog); extern void inet_sock_release(struct sock *sk); diff --git a/include/net/sock.h b/include/net/sock.h index 57159c6ce0bd..fc617efe2476 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -132,7 +132,6 @@ struct sock { unsigned char rcvtstamp; /* Hole of 1 byte. Try to pack. */ int route_caps; - int proc; unsigned long lingertime; int hashent; @@ -292,7 +291,6 @@ static __inline__ void sock_prot_dec_use(struct proto *prot) #define SOCK_BINDADDR_LOCK 4 #define SOCK_BINDPORT_LOCK 8 -#include /* just for inode - yeuch.*/ /* Used by processes to "lock" a socket state, so that @@ -362,6 +360,7 @@ extern struct sk_buff *sock_alloc_send_pskb(struct sock *sk, int *errcode); extern void *sock_kmalloc(struct sock *sk, int size, int priority); extern void sock_kfree_s(struct sock *sk, void *mem, int size); +extern void sk_send_sigurg(struct sock *sk); /* * Functions to fill in entries in struct proto_ops when a protocol @@ -388,8 +387,6 @@ extern int sock_no_getsockopt(struct socket *, int , int, char *, int *); extern int sock_no_setsockopt(struct socket *, int, int, char *, int); -extern int sock_no_fcntl(struct socket *, - unsigned int, unsigned long); extern int sock_no_sendmsg(struct socket *, struct msghdr *, int, struct scm_cookie *); -- cgit v1.2.3