From: Greg Kroah-Hartman Date: Wed, 26 Oct 2016 13:15:42 +0000 (+0200) Subject: move ubifs patch to next round X-Git-Tag: v4.8.5~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=489f7c4a121e23c331c816c654e58e4296305295;p=thirdparty%2Fkernel%2Fstable-queue.git move ubifs patch to next round --- diff --git a/queue-4.4/series b/queue-4.4/series index ab1760958b1..87798497012 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -106,7 +106,6 @@ mmc-rtsx_usb_sdmmc-handle-runtime-pm-while-changing-the-led.patch ext4-do-not-advertise-encryption-support-when-disabled.patch jbd2-fix-incorrect-unlock-on-j_list_lock.patch ubifs-fix-xattr_names-length-in-exit-paths.patch -ubifs-abort-readdir-upon-error.patch target-re-add-missing-scf_ack_kref-assignment-in-v4.1.y.patch target-make-extended_copy-0xe4-failure-return-copy-target-device-not-reachable.patch target-don-t-override-extended_copy-xcopy_pt_cmd-scsi-status-code.patch diff --git a/queue-4.8/series b/queue-4.8/series index efead7bcf1e..5f4e70085df 100644 --- a/queue-4.8/series +++ b/queue-4.8/series @@ -132,7 +132,6 @@ fscrypto-lock-inode-while-setting-encryption-policy.patch ext4-do-not-advertise-encryption-support-when-disabled.patch jbd2-fix-incorrect-unlock-on-j_list_lock.patch ubifs-fix-xattr_names-length-in-exit-paths.patch -ubifs-abort-readdir-upon-error.patch target-tcm_fc-use-cpu-affinity-for-responses.patch target-re-add-missing-scf_ack_kref-assignment-in-v4.1.y.patch target-make-extended_copy-0xe4-failure-return-copy-target-device-not-reachable.patch diff --git a/queue-4.8/ubifs-abort-readdir-upon-error.patch b/queue-4.8/ubifs-abort-readdir-upon-error.patch deleted file mode 100644 index 3159ea12b6e..00000000000 --- a/queue-4.8/ubifs-abort-readdir-upon-error.patch +++ /dev/null @@ -1,59 +0,0 @@ -From c83ed4c9dbb358b9e7707486e167e940d48bfeed Mon Sep 17 00:00:00 2001 -From: Richard Weinberger -Date: Wed, 19 Oct 2016 12:43:07 +0200 -Subject: ubifs: Abort readdir upon error - -From: Richard Weinberger - -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 -Signed-off-by: Greg Kroah-Hartman - ---- - fs/ubifs/dir.c | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - ---- a/fs/ubifs/dir.c -+++ b/fs/ubifs/dir.c -@@ -350,7 +350,7 @@ static unsigned int vfs_dent_type(uint8_ - */ - static int ubifs_readdir(struct file *file, struct dir_context *ctx) - { -- int err; -+ int err = 0; - struct qstr nm; - union ubifs_key key; - struct ubifs_dent_node *dent; -@@ -452,14 +452,12 @@ out: - kfree(file->private_data); - file->private_data = NULL; - -- if (err != -ENOENT) { -+ if (err != -ENOENT) - ubifs_err(c, "cannot find next direntry, error %d", err); -- return err; -- } - - /* 2 is a special value indicating that there are no more direntries */ - ctx->pos = 2; -- return 0; -+ return err; - } - - /* Free saved readdir() state when the directory is closed */ diff --git a/queue-4.4/ubifs-abort-readdir-upon-error.patch b/wait_a_release/ubifs-abort-readdir-upon-error.patch similarity index 100% rename from queue-4.4/ubifs-abort-readdir-upon-error.patch rename to wait_a_release/ubifs-abort-readdir-upon-error.patch