summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-10-02 02:17:15 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-02 07:57:14 -0700
commit609d7fa9565c754428d2520cac2accc9052e1245 (patch)
tree1c5114ec3720166fe99ce3885e8767929a8a84e0 /include/linux
parentbde0d2c98bcfc9acc83ac79c33a6ac1335b95a92 (diff)
downloadlinux-3.10-609d7fa9565c754428d2520cac2accc9052e1245.tar.gz
linux-3.10-609d7fa9565c754428d2520cac2accc9052e1245.tar.bz2
linux-3.10-609d7fa9565c754428d2520cac2accc9052e1245.zip
[PATCH] file: modify struct fown_struct to use a struct pid
File handles can be requested to send sigio and sigurg to processes. By tracking the destination processes using struct pid instead of pid_t we make the interface safe from all potential pid wrap around problems. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2e29a2edaee..91c0b2a32a9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -684,7 +684,8 @@ extern struct block_device *I_BDEV(struct inode *inode);
struct fown_struct {
rwlock_t lock; /* protects pid, uid, euid fields */
- int pid; /* pid or -pgrp where SIGIO should be sent */
+ struct pid *pid; /* pid or -pgrp where SIGIO should be sent */
+ enum pid_type pid_type; /* Kind of process group SIGIO should be sent to */
uid_t uid, euid; /* uid/euid of process setting the owner */
int signum; /* posix.1b rt signal to be delivered on IO */
};
@@ -880,8 +881,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, struct pid *, enum pid_type, int force);
extern int f_setown(struct file *filp, unsigned long arg, int force);
extern void f_delown(struct file *filp);
+extern pid_t f_getown(struct file *filp);
extern int send_sigurg(struct fown_struct *fown);
/*