]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
jffs2: Fix long-standing bug with symlink garbage collection.
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 16 Dec 2009 03:27:20 +0000 (03:27 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 21:31:03 +0000 (13:31 -0800)
commit78ba3f31ee0e1adaa141ab4cafac9df53c6c020a
tree3c5e65429e6db68d0a32e497df5c1d8a1996f647
parent196dc9ece8c31f9b876f33f2ac3b4597fd08930e
jffs2: Fix long-standing bug with symlink garbage collection.

commit 2e16cfca6e17ae37ae21feca080a6f2eca9087dc upstream.

Ever since jffs2_garbage_collect_metadata() was first half-written in
February 2001, it's been broken on architectures where 'char' is signed.
When garbage collecting a symlink with target length above 127, the payload
length would end up negative, causing interesting and bad things to happen.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/jffs2/gc.c