Commit [3a0345]  Maximize  Restore  History

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 <>
Signed-off-by: Greg Kroah-Hartman <>

David Woodhouse David Woodhouse 2009-12-16

Greg Kroah-Hartman Greg Kroah-Hartman 2009-12-18

changed fs/jffs2/gc.c
fs/jffs2/gc.c Diff Switch to side-by-side view

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks