RAMOOPS: Don't overflow over non-allocated regions
authorAhmed S. Darwish <darwish.07@gmail.com>
Sat, 25 Dec 2010 09:57:09 +0000 (11:57 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Dec 2010 19:12:32 +0000 (11:12 -0800)
commit1873bb8115e678ad9fd0aac9dbbc68383bc36e06
tree938017e949de036589035da33975257e68afed65
parentffc96d628b651b69b39909fc3e9e8f465df1eed3
RAMOOPS: Don't overflow over non-allocated regions

The current code mis-calculates the ramoops header size, leading to an
overflow over the next record at best, or over a non-allocated region at
worst.  Fix that calculation.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Marco Stornelli <marco.stornelli@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/ramoops.c