* [PATCH] vfs: fix missing unlock on error in simple_xattr_list()
[not found] <1455890418-18353-1-git-send-email-agruenba@redhat.com>
@ 2016-02-19 14:00 ` Andreas Gruenbacher
0 siblings, 0 replies; only message in thread
From: Andreas Gruenbacher @ 2016-02-19 14:00 UTC (permalink / raw)
Cc: Wei Yongjun, stable
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing unlock before return from function simple_xattr_list()
in the error handling case.
Fixes: 786534b92f3c (tmpfs: listxattr should include POSIX ACL xattrs)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Cc: <stable@vger.kernel.org> # 4.4
---
fs/xattr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/xattr.c b/fs/xattr.c
index 07d0e47..d4f8487 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -964,8 +964,10 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
continue;
err = xattr_list_one(&buffer, &remaining_size, xattr->name);
- if (err)
+ if (err) {
+ spin_unlock(&xattrs->lock);
return err;
+ }
}
spin_unlock(&xattrs->lock);
--
2.4.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-19 14:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1455890418-18353-1-git-send-email-agruenba@redhat.com>
2016-02-19 14:00 ` [PATCH] vfs: fix missing unlock on error in simple_xattr_list() Andreas Gruenbacher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).