diff options
author | Chris Snook <csnook@redhat.com> | 2007-05-08 03:24:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:14:59 -0400 |
commit | 1ae7075bcd805c3aa5e8f53effc63a4562d6110e (patch) | |
tree | 76ce9da136deee264b1642169522981b5175af82 /include/linux | |
parent | 7b8e89249ba54fb6e12358bbed7e3070fa1d1e6a (diff) |
use use SEEK_MAX to validate user lseek arguments
Add SEEK_MAX and use it to validate lseek arguments from userspace.
Signed-off-by: Chris Snook <csnook@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 020a8426e10a..986b5d5d369f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #define SEEK_SET 0 /* seek relative to beginning of file */ | 30 | #define SEEK_SET 0 /* seek relative to beginning of file */ |
31 | #define SEEK_CUR 1 /* seek relative to current file position */ | 31 | #define SEEK_CUR 1 /* seek relative to current file position */ |
32 | #define SEEK_END 2 /* seek relative to end of file */ | 32 | #define SEEK_END 2 /* seek relative to end of file */ |
33 | #define SEEK_MAX SEEK_END | ||
33 | 34 | ||
34 | /* And dynamically-tunable limits and defaults: */ | 35 | /* And dynamically-tunable limits and defaults: */ |
35 | struct files_stat_struct { | 36 | struct files_stat_struct { |