[Cluster-devel] [GFS2 PATCH] GFS2: Don't dereference inode in gfs2_inode_lookup until it's valid

2016-04-13 Thread Bob Peterson
Hi, Andreas pointed this bug out yesterday: Function gfs2_inode_lookup was dereferencing the inode, and after, it checks for the value being NULL. We need to check that first. Signed-off-by: Bob Peterson --- diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index

Re: [Cluster-devel] [PATCH 2/8] cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT

2016-04-13 Thread Steve French
merged into cifs-2.6.git On Wed, Apr 13, 2016 at 5:30 PM, Andreas Gruenbacher wrote: > The two values ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT are meant to be > enumerations, not bits in a bit mask. Use '==' instead of '&' to check > for these values. > > Signed-off-by: Andreas

Re: [Cluster-devel] [PATCH 1/8] cifs: Fix xattr name checks

2016-04-13 Thread Al Viro
On Wed, Apr 13, 2016 at 11:26:24PM -0500, Steve French wrote: > Thanks for spotting this - merged into cifs-2.6.git. checkpatch > spotted and old indentation issue so I cleaned that up in a followon > patch that I will send. *ugh* And in the meanwhile I'd picked those into my queue... Could

Re: [Cluster-devel] [PATCH 1/8] cifs: Fix xattr name checks

2016-04-13 Thread Steve French
If you prefer merging those out of your tree, you can add my Reviewed-by if needed (for the three cifs patches) On Wed, Apr 13, 2016 at 11:43 PM, Steve French wrote: > If you are planning to merge it in next few weeks (they fix bugs, and > are safe so why not), I can simply

Re: [Cluster-devel] [PATCH 1/8] cifs: Fix xattr name checks

2016-04-13 Thread Al Viro
On Wed, Apr 13, 2016 at 11:43:19PM -0500, Steve French wrote: > If you are planning to merge it in next few weeks (they fix bugs, and > are safe so why not), I can simply just back out my changes from > cifs-2.6.git for-next branch and let you merge the trivial checkpatch > cleanup attached. Do

Re: [Cluster-devel] [PATCH 1/8] cifs: Fix xattr name checks

2016-04-13 Thread Steve French
Thanks for spotting this - merged into cifs-2.6.git. checkpatch spotted and old indentation issue so I cleaned that up in a followon patch that I will send. On Wed, Apr 13, 2016 at 5:30 PM, Andreas Gruenbacher wrote: > Use strcmp(str, name) instead of strncmp(str, name,

Re: [Cluster-devel] [PATCH 3/8] cifs: Fix removexattr for os2.* xattrs

2016-04-13 Thread Steve French
merged into cifs-2.6.git checkpatch complained about comment formatting so I cleaned that up in attached trivial followon patch. On Wed, Apr 13, 2016 at 5:30 PM, Andreas Gruenbacher wrote: > If cifs_removexattr finds a "user." or "os2." xattr name prefix, it > skips 5

Re: [Cluster-devel] [PATCH 1/8] cifs: Fix xattr name checks

2016-04-13 Thread Steve French
If you are planning to merge it in next few weeks (they fix bugs, and are safe so why not), I can simply just back out my changes from cifs-2.6.git for-next branch and let you merge the trivial checkpatch cleanup attached. On Wed, Apr 13, 2016 at 11:37 PM, Al Viro

[Cluster-devel] [PATCH 4/8] ceph: Get rid of d_find_alias in ceph_set_acl

2016-04-13 Thread Andreas Gruenbacher
Create a variant of ceph_setattr that takes an inode instead of a dentry. Change __ceph_setxattr (and also __ceph_removexattr) to take an inode instead of a dentry. Use those in ceph_set_acl so that we no longer need a dentry there. Signed-off-by: Andreas Gruenbacher

[Cluster-devel] [PATCH 2/8] cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT

2016-04-13 Thread Andreas Gruenbacher
The two values ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT are meant to be enumerations, not bits in a bit mask. Use '==' instead of '&' to check for these values. Signed-off-by: Andreas Gruenbacher --- fs/cifs/cifssmb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[Cluster-devel] [PATCH 1/8] cifs: Fix xattr name checks

2016-04-13 Thread Andreas Gruenbacher
Use strcmp(str, name) instead of strncmp(str, name, strlen(name)) for checking if str and name are the same (as opposed to name being a prefix of str) in the gexattr and setxattr inode operations. Signed-off-by: Andreas Gruenbacher --- fs/cifs/xattr.c | 24

[Cluster-devel] [PATCH 4/8] ceph: Get rid of d_find_alias in ceph_set_acl

2016-04-13 Thread Andreas Gruenbacher
Create a variant of ceph_setattr that takes an inode instead of a dentry. Change __ceph_setxattr (and also __ceph_removexattr) to take an inode instead of a dentry. Use those in ceph_set_acl so that we no longer need a dentry there. Signed-off-by: Andreas Gruenbacher

[Cluster-devel] [PATCH 5/8] ceph: Switch to generic xattr handlers

2016-04-13 Thread Andreas Gruenbacher
Add a catch-all xattr handler at the end of ceph_xattr_handlers. Check for valid attribute names there, and remove those checks from __ceph_{get,set,remove}xattr instead. No "system.*" xattrs need to be handled by the catch-all handler anymore. The set xattr handler is called with a NULL value

[Cluster-devel] [PATCH 2/8] cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT

2016-04-13 Thread Andreas Gruenbacher
The two values ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT are meant to be enumerations, not bits in a bit mask. Use '==' instead of '&' to check for these values. Signed-off-by: Andreas Gruenbacher --- fs/cifs/cifssmb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[Cluster-devel] [PATCH 1/8] cifs: Fix xattr name checks

2016-04-13 Thread Andreas Gruenbacher
Use strcmp(str, name) instead of strncmp(str, name, strlen(name)) for checking if str and name are the same (as opposed to name being a prefix of str) in the gexattr and setxattr inode operations. Signed-off-by: Andreas Gruenbacher --- fs/cifs/xattr.c | 24

[Cluster-devel] [PATCH 7/8] posix acls: Export xattr_handler functions

2016-04-13 Thread Andreas Gruenbacher
These functions are useful in filesystems like gfs2 which require pre-/postamble code around xattr operations. Signed-off-by: Andreas Gruenbacher Reviewed-by: Bob Peterson --- fs/posix_acl.c | 9 ++---

Re: [Cluster-devel] [PATCH] xattr: Export xattr_resolve_name

2016-04-13 Thread Andreas Gruenbacher
On Wed, Apr 13, 2016 at 8:20 PM, Al Viro wrote: > On Wed, Apr 13, 2016 at 05:40:34PM +0200, Andreas Gruenbacher wrote: >> Export xattr_resolve_name and make it easier to use by filesystems. >> Use it to remove reiserfs's own copy of the same functionality. > > Nah - I've

[Cluster-devel] [PATCH 6/8] ceph: kill __ceph_removexattr()

2016-04-13 Thread Andreas Gruenbacher
From: "Yan, Zheng" when removing a xattr, generic_removexattr() calls __ceph_setxattr() with NULL value and XATTR_REPLACE flag. __ceph_removexattr() is not used any more. Signed-off-by: "Yan, Zheng" --- fs/ceph/xattr.c | 126

[Cluster-devel] [PATCH 3/8] cifs: Fix removexattr for os2.* xattrs

2016-04-13 Thread Andreas Gruenbacher
If cifs_removexattr finds a "user." or "os2." xattr name prefix, it skips 5 bytes, one byte too many for "os2.". Signed-off-by: Andreas Gruenbacher --- fs/cifs/xattr.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git

[Cluster-devel] [PATCH 5/8] ceph: Switch to generic xattr handlers

2016-04-13 Thread Andreas Gruenbacher
Add a catch-all xattr handler at the end of ceph_xattr_handlers. Check for valid attribute names there, and remove those checks from __ceph_{get,set,remove}xattr instead. No "system.*" xattrs need to be handled by the catch-all handler anymore. The set xattr handler is called with a NULL value

[Cluster-devel] [PATCH 7/8] posix acls: Export xattr_handler functions

2016-04-13 Thread Andreas Gruenbacher
These functions are useful in filesystems like gfs2 which require pre-/postamble code around xattr operations. Signed-off-by: Andreas Gruenbacher Reviewed-by: Bob Peterson --- fs/posix_acl.c | 9 ++---

Re: [Cluster-devel] [PATCH] xattr: Export xattr_resolve_name

2016-04-13 Thread Andreas Gruenbacher
On Wed, Apr 13, 2016 at 8:20 PM, Al Viro wrote: > On Wed, Apr 13, 2016 at 05:40:34PM +0200, Andreas Gruenbacher wrote: >> Export xattr_resolve_name and make it easier to use by filesystems. >> Use it to remove reiserfs's own copy of the same functionality. > > Nah - I've

[Cluster-devel] [PATCH 6/8] ceph: kill __ceph_removexattr()

2016-04-13 Thread Andreas Gruenbacher
From: "Yan, Zheng" when removing a xattr, generic_removexattr() calls __ceph_setxattr() with NULL value and XATTR_REPLACE flag. __ceph_removexattr() is not used any more. Signed-off-by: "Yan, Zheng" --- fs/ceph/xattr.c | 126

[Cluster-devel] [PATCH 8/8] gfs2: Switch to generic xattr handlers

2016-04-13 Thread Andreas Gruenbacher
Move the pre- and postamble code in gfs2_{get,set,remove}xattr into the handlers in gfs2_xattr_handlers. Replace the generic POSIX ACL handlers in there with gfs2-specific versions that wrap the generic handlers into the pre- and postamble code. With that, gfs2_{get,set,remove}xattr can be

[Cluster-devel] [PATCH 3/8] cifs: Fix removexattr for os2.* xattrs

2016-04-13 Thread Andreas Gruenbacher
If cifs_removexattr finds a "user." or "os2." xattr name prefix, it skips 5 bytes, one byte too many for "os2.". Signed-off-by: Andreas Gruenbacher --- fs/cifs/xattr.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git