summaryrefslogtreecommitdiffstats
path: root/fs/proc/generic.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-15 01:55:58 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-15 01:55:58 +0000
commit53b3988d474435254a3b053a68bb24ce9e439295 (patch)
treef8da8e40f01f4ad02bbd76b8c9920749b118235f /fs/proc/generic.c
parentb0cb48abe83d1a4389ea938bf624f8baa82c5047 (diff)
Merge with 2.3.99-pre9.
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r--fs/proc/generic.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 31e43fab9..1585657a2 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -140,9 +140,13 @@ proc_file_lseek(struct file * file, loff_t offset, int orig)
{
switch (orig) {
case 0:
+ if (offset < 0)
+ return -EINVAL;
file->f_pos = offset;
return(file->f_pos);
case 1:
+ if (offset + file->f_pos < 0)
+ return -EINVAL;
file->f_pos += offset;
return(file->f_pos);
case 2:
@@ -218,10 +222,9 @@ static struct inode_operations proc_link_inode_operations = {
* smarter: we could keep a "volatile" flag in the
* inode to indicate which ones to keep.
*/
-static void
-proc_delete_dentry(struct dentry * dentry)
+static int proc_delete_dentry(struct dentry * dentry)
{
- d_drop(dentry);
+ return 1;
}
static struct dentry_operations proc_dentry_operations =
@@ -340,7 +343,7 @@ static struct inode_operations proc_dir_inode_operations = {
lookup: proc_lookup,
};
-int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp)
+static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp)
{
int i;