linux-stable/fs/ubifs
Richard Weinberger c83ed4c9db ubifs: Abort readdir upon error
If UBIFS is facing an error while walking a directory, it reports this
error and ubifs_readdir() returns the error code. But the VFS readdir
logic does not make the getdents system call fail in all cases. When the
readdir cursor indicates that more entries are present, the system call
will just return and the libc wrapper will try again since it also
knows that more entries are present.
This causes the libc wrapper to busy loop for ever when a directory is
corrupted on UBIFS.
A common approach do deal with corrupted directory entries is
skipping them by setting the cursor to the next entry. On UBIFS this
approach is not possible since we cannot compute the next directory
entry cursor position without reading the current entry. So all we can
do is setting the cursor to the "no more entries" position and make
getdents exit.

Cc: stable@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
2016-10-20 00:06:11 +02:00
..
budget.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
commit.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
compress.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
debug.c ubifs: ubifs_dump_inode: Fix dumping field bulk_read 2016-05-24 15:29:44 +02:00
debug.h UBIFS: print less 2012-08-31 17:32:58 +03:00
dir.c ubifs: Abort readdir upon error 2016-10-20 00:06:11 +02:00
file.c This pull request contains: 2016-10-11 10:49:44 -07:00
find.c UBIFS: fix mounting problems after power cuts 2012-10-26 16:26:44 +03:00
gc.c UBIFS: improve function-level documentation 2016-10-02 22:55:02 +02:00
io.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
ioctl.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
journal.c ubifs: Use move variable in ubifs_rename() 2016-10-02 22:55:02 +02:00
Kconfig ubifs: introduce UBIFS_ATIME_SUPPORT to ubifs 2015-11-07 11:35:08 +01:00
key.h UBIFS: add a comment in key.h for unused parameter 2016-01-10 12:33:30 +01:00
log.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
lprops.c UBIFS: improve function-level documentation 2016-10-02 22:55:02 +02:00
lpt.c UBIFS: use kmemdup rather than duplicating its implementation 2015-10-03 20:03:14 +02:00
lpt_commit.c UBIFS: improve function-level documentation 2016-10-02 22:55:02 +02:00
Makefile ubifs: Add logging functions for ubifs_msg, ubifs_err and ubifs_warn 2016-03-20 21:36:05 +01:00
master.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
misc.c ubifs: Add logging functions for ubifs_msg, ubifs_err and ubifs_warn 2016-03-20 21:36:05 +01:00
misc.h fs/ubifs: remove unnecessary new_valid_dev check 2015-11-06 23:26:48 +01:00
orphan.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
recovery.c UBIFS: Delete unnecessary checks before the function call "iput" 2015-11-06 23:26:52 +01:00
replay.c UBIFS: improve function-level documentation 2016-10-02 22:55:02 +02:00
sb.c lib/uuid.c: move generate_random_uuid() to uuid.c 2016-05-20 17:58:30 -07:00
scan.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
shrinker.c UBIFS: Remove incorrect assertion in shrink_tnc() 2014-06-02 11:28:24 +03:00
super.c ubifs: Silence early error messages if MS_SILENT is set 2016-07-29 23:30:36 +02:00
tnc.c UBIFS: use kmemdup rather than duplicating its implementation 2015-10-03 20:03:14 +02:00
tnc_commit.c ubifs: Fix assertion in layout_in_gaps() 2016-08-23 23:02:40 +02:00
tnc_misc.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
ubifs-media.h
ubifs.h ubifs: Implement RENAME_EXCHANGE 2016-10-02 22:55:02 +02:00
xattr.c ubifs: Fix xattr_names length in exit paths 2016-10-20 00:05:54 +02:00