Commit c227e69028473c7c7994a9b0a2cc0034f3f7e0fe

Authored by Arnd Bergmann
Committed by Linus Torvalds
1 parent a9e31765e7

/proc/vmcore: fix seeking

Commit 73296bc611 ("procfs: Use generic_file_llseek in /proc/vmcore")
broke seeking on /proc/vmcore.  This changes it back to use default_llseek
in order to restore the original behaviour.

The problem with generic_file_llseek is that it only allows seeks up to
inode->i_sb->s_maxbytes, which is zero on procfs and some other virtual
file systems.  We should merge generic_file_llseek and default_llseek some
day and clean this up in a proper way, but for 2.6.35/36, reverting vmcore
is the safer solution.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Reported-by: CAI Qian <caiqian@redhat.com>
Tested-by: CAI Qian <caiqian@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -163,7 +163,7 @@
163 163  
164 164 static const struct file_operations proc_vmcore_operations = {
165 165 .read = read_vmcore,
166   - .llseek = generic_file_llseek,
  166 + .llseek = default_llseek,
167 167 };
168 168  
169 169 static struct vmcore* __init get_new_element(void)