Hi Henry-- On Thu, 29 Apr 2010, Henry C Chang wrote: > 1. fill_inode() incorrectly frees the xattr blob in the end of the > function. It will cause segfault and then kernel will crash. I fixed this slightly differently, by clearing xattr_blob if/when it is used. See http://ceph.newdream.net/git/?p=ceph-client.git;a=commitdiff;h=c89f9c6decdbe2427d4d510a949a2d87c5e340dc > 2. ceph_listxattr() should compare index_version and version by '>='. http://ceph.newdream.net/git/?p=ceph-client.git;a=commitdiff;h=da6eb075f800b64af9e199ffbe9171752647fbaa Both are pushed to the unstable branch. Do you mind testing? Do you have a simple test that reproduced the bug before? If so we should add it to the qa suite (which currently does nothing with xattrs). Thanks! sage > > Signed-off-by: henry_c_chang <henry_c_chang@xxxxxxxxxxxxxxxxxxx> > --- > inode.c | 2 +- > xattr.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/inode.c b/inode.c > index 261f3e6..bfe48ee 100644 > --- a/inode.c > +++ b/inode.c > @@ -742,7 +742,7 @@ no_change: > err = 0; > > out: > - if (xattr_blob) > + if (err && xattr_blob) > ceph_buffer_put(xattr_blob); > return err; > } > diff --git a/xattr.c b/xattr.c > index 37d6ce6..8c4ef01 100644 > --- a/xattr.c > +++ b/xattr.c > @@ -573,7 +573,7 @@ ssize_t ceph_listxattr(struct dentry *dentry, char > *names, size_t size) > ci->i_xattrs.version, ci->i_xattrs.index_version); > > if (__ceph_caps_issued_mask(ci, CEPH_CAP_XATTR_SHARED, 1) && > - (ci->i_xattrs.index_version > ci->i_xattrs.version)) { > + (ci->i_xattrs.index_version >= ci->i_xattrs.version)) { > goto list_xattr; > } else { > spin_unlock(&inode->i_lock); > -- > 1.6.3.3 > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html