alistair23-linux/fs/ubifs
Adam Thomas 2928f0d0c5 UBIFS: fix use of freed ubifs_orphan objects
The last orphan in the cnext list has its cnext set to NULL. Because
of that, ubifs_delete_orphan assumes that it is not on the cnext list
and frees it immediately instead of adding it to the dnext list. The
freed orphan is later modified by write_orph_node.

This can cause various inconsistencies including directory entries
that cannot be removed and this error:

UBIFS error (pid 20685): layout_cnodes: LPT out of space at LEB 14:129009 needing 17, done_ltab 1, done_lsave 1

This is a regression introduced by
"7074e5eb UBIFS: remove invalid reference to list iterator variable".

This change adds an explicit flag to ubifs_orphan indicating whether
it is pending commit.

Signed-off-by: Adam Thomas <adamthomas1111@gmail.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org # v3.6+
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-02-04 12:31:00 +02:00
..
budget.c No big changes for 3.7 in UBIFS: 2012-10-02 20:47:48 -07:00
commit.c UBIFS: print less 2012-08-31 17:32:58 +03:00
compress.c UBIFS: comply with coding style 2012-08-31 17:32:57 +03:00
debug.c UBIFS: rename random32() to prandom_u32() 2013-01-15 15:45:27 +02:00
debug.h UBIFS: print less 2012-08-31 17:32:58 +03:00
dir.c lseek: the "whence" argument is called "whence" 2012-12-17 17:15:12 -08:00
file.c mm: kill vma flag VM_CAN_NONLINEAR 2012-10-09 16:22:17 +09:00
find.c UBIFS: fix mounting problems after power cuts 2012-10-26 16:26:44 +03:00
gc.c UBIFS: comply with coding style 2012-08-31 17:32:57 +03:00
io.c UBI: Kill data type hint 2012-05-20 20:25:59 +03:00
ioctl.c vfs: mnt_drop_write_file() 2012-01-03 22:52:40 -05:00
journal.c userns: Convert ubifs to use kuid/kgid 2012-09-21 03:13:36 -07:00
Kconfig UBIFS: remove Kconfig debugging option 2012-05-16 19:53:46 +03:00
key.h UBIFS: mark unused key objects as invalid 2010-08-30 10:19:08 +03:00
log.c UBIFS: comply with coding style 2012-08-31 17:32:57 +03:00
lprops.c UBIFS: introduce categorized lprops counter 2012-10-26 16:00:26 +03:00
lpt.c UBIFS: print less 2012-08-31 17:32:58 +03:00
lpt_commit.c UBIFS: rename random32() to prandom_u32() 2013-01-15 15:45:27 +02:00
Makefile UBIFS: remove Kconfig debugging option 2012-05-16 19:53:46 +03:00
master.c UBI: Kill data type hint 2012-05-20 20:25:59 +03:00
misc.h UBIFS: introduce more I/O helpers 2011-07-04 10:54:33 +03:00
orphan.c UBIFS: fix use of freed ubifs_orphan objects 2013-02-04 12:31:00 +02:00
recovery.c UBIFS: comply with coding style 2012-08-31 17:32:57 +03:00
replay.c UBIFS: print less 2012-08-31 17:32:58 +03:00
sb.c No big changes for 3.7 in UBIFS: 2012-10-02 20:47:48 -07:00
scan.c UBIFS: comply with coding style 2012-08-31 17:32:57 +03:00
shrinker.c UBIFS: fix shrinker object count reports 2011-06-03 18:12:24 +03:00
super.c No big changes for 3.7 in UBIFS: 2012-10-02 20:47:48 -07:00
tnc.c UBIFS: 2012-05-22 19:30:27 -07:00
tnc_commit.c UBIFS: rename random32() to prandom_u32() 2013-01-15 15:45:27 +02:00
tnc_misc.c UBIFS: print less 2012-08-31 17:32:58 +03:00
ubifs-media.h UBIFS: add a superblock flag for free space fix-up 2011-05-16 14:12:14 +03:00
ubifs.h UBIFS: fix use of freed ubifs_orphan objects 2013-02-04 12:31:00 +02:00
xattr.c UBIFS: 2012-05-22 19:30:27 -07:00