Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1516112
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.12 55/72] ubifs: Fix xattr_names length in exit paths |
| Date | 2016-11-07 14:10 +0100 |
| Message-ID | <sARQu-3wK-49@gated-at.bofh.it> (permalink) |
| References | <sARQt-3wK-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Richard Weinberger <richard@nod.at> 3.12-stable review patch. If anyone has any objections, please let me know. =============== 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. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Jiri Slaby <jslaby@suse.cz> --- fs/ubifs/xattr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index 0f7139bdb2c2..69a42f36b421 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c @@ -167,6 +167,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); @@ -514,6 +515,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); -- 2.10.2
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.12 55/72] ubifs: Fix xattr_names length in exit paths Jiri Slaby <jslaby@suse.cz> - 2016-11-07 14:10 +0100
csiph-web