aboutsummaryrefslogtreecommitdiff
path: root/Documentation/development-process/4.Coding
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2016-10-19 12:43:07 +0200
committerMister Oyster <oysterized@gmail.com>2017-04-11 10:58:20 +0200
commit40617a198d0570303323e1e6761ec343edfb1fb0 (patch)
tree72055dfbd1489d8e832bb844ad4ad26503c7a89c /Documentation/development-process/4.Coding
parentec014b1aa4f5f747f44e7f619bb5522eefadab4b (diff)
ubifs: Abort readdir upon error
commit c83ed4c9dbb358b9e7707486e167e940d48bfeed upstream. 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. Signed-off-by: Richard Weinberger <richard@nod.at> [wt: adjusted context] Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'Documentation/development-process/4.Coding')
0 files changed, 0 insertions, 0 deletions