Patch "ubifs: Fix xattr_names length in exit paths" has been added to the 4.8-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
ubifs: Fix xattr_names length in exit paths
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ubifs-fix-xattr_names-length-in-exit-paths.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
843741c5778398ea67055067f4cc65ae6c80ca0eMon Sep 17 00:00:00 2001
From: Richard Weinberger <[email protected]>
Date: Tue, 20 Sep 2016 10:08:30 +0200
Subject: ubifs: Fix xattr_names length in exit paths
From: Richard Weinberger <[email protected]>
commit 843741c5778398ea67055067f4cc65ae6c80ca0e upstream.
When the operation fails we also have to undo the changes we made to ->xattr_names. Otherwise listxattr() will report wrong lengths.
--- fs/ubifs/xattr.c | 2 ++ 1 file changed, 2 insertions(+)
fs/ubifs/xattr.c +2 -0
@@ -172,6 +172,7 @@ out_cancel: host_ui->xattr_cnt -=1 ; host_ui->xattr_size -=CALC_DENT_SIZE (nm->len); host_ui->xattr_size -=CALC_XATTR_BYTES (size); + host_ui->xattr_names -= nm->len;mutex_unlock (&host_ui->ui_mutex); out_free:make_bad_inode (inode);
@@ -476,6 +477,7 @@ out_cancel: host_ui->xattr_cnt +=1 ; host_ui->xattr_size +=CALC_DENT_SIZE (nm->len); host_ui->xattr_size +=CALC_XATTR_BYTES (ui->data_len); + host_ui->xattr_names += nm->len;mutex_unlock (&host_ui->ui_mutex);ubifs_release_budget (c, &req);make_bad_inode (inode);
Patches currently in stable-queue which might be from [email protected] are
queue-4.8/ubifs-abort-readdir-upon-error.patch queue-4.8/ubi-deal-with-interrupted-erasures-in-wl.patch queue-4.8/fscrypto-lock-inode-while-setting-encryption-policy.patch queue-4.8/ubifs-fix-xattr_names-length-in-exit-paths.patch queue-4.8/ovl-fix-info-leak-in-ovl_lookup_temp.patch