]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 16 Dec 2009 03:27:20 +0000 (03:27 +0000)
commit4469473f547ac6ec7e6b2d331d771a1146b2be09
tree6474bcbf5d7f79d359b07fd187093beb4b8b489d
parent51f45cfbb6d318de6f82fd6a57813d562fb0ba76
jffs2: Fix long-standing bug with symlink garbage collection.

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.

Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
fs/jffs2/gc.c