Skip to content

Commit

Permalink
/proc/kcore: fix seeking
Browse files Browse the repository at this point in the history
Commit 34aacb2 ("procfs: Use generic_file_llseek in /proc/kcore") broke
seeking on /proc/kcore.  This changes it back to use default_llseek in
order to restore the original behavior.

The problem with generic_file_llseek is that it only allows seeks up to
inode->i_sb->s_maxbytes, which is 2GB-1 on procfs, where the memory file
offset values in the /proc/kcore PT_LOAD segments may exceed or start
beyond that offset value.

A similar revert was made for /proc/vmcore.

Signed-off-by: Dave Anderson <anderson@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Dave Anderson authored and torvalds committed Jan 13, 2011
1 parent bf33cbd commit ceff1a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/proc/kcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ static int open_kcore(struct inode *inode, struct file *filp)
static const struct file_operations proc_kcore_operations = {
.read = read_kcore,
.open = open_kcore,
.llseek = generic_file_llseek,
.llseek = default_llseek,
};

#ifdef CONFIG_MEMORY_HOTPLUG
Expand Down

0 comments on commit ceff1a7

Please sign in to comment.