Message ID | 1454680202-17959-1-git-send-email-weiyj_lk@163.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
2016-02-05 14:50 GMT+01:00 <weiyj_lk@163.com>: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > Add the missing unlock before return from function simple_xattr_list() > in the error handling case. Thanks, this is equivalent to the fix already posted under the subject: [PATCH] xattr handlers: plug a lock leak in simple_xattr_list Andreas -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Feb 05, 2016 at 04:51:51PM +0100, Andreas Grünbacher wrote: > 2016-02-05 14:50 GMT+01:00 <weiyj_lk@163.com>: > > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > > > Add the missing unlock before return from function simple_xattr_list() > > in the error handling case. > > Thanks, this is equivalent to the fix already posted under the subject: > > [PATCH] xattr handlers: plug a lock leak in simple_xattr_list ... and will be pushed into #for-linus later today, once I sort out what the hell is going on with xfstests ;-/ This patch is obviously not the source of problems I'm seeing, but I'd like to figure out what _is_... -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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);