lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1290015424-5583-3-git-send-email-apw@canonical.com>
Date:	Wed, 17 Nov 2010 17:37:04 +0000
From:	Andy Whitcroft <apw@...onical.com>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	vaurora@...hat.com, neilb@...e.de, viro@...iv.linux.org.uk,
	Andy Whitcroft <apw@...onical.com>
Subject: [PATCH 2/2] overlayfs: ovl_copy_up_xattr -- handle EOPNOTSUPP from vfs_listxattr

Even when an underlying filesystem had a getxattr op it may not support
xattrs.  In this case vfs_listxattr will return EOPNOTSUPP.  Handle
this return when copying up attributes.

Signed-off-by: Andy Whitcroft <apw@...onical.com>
---
 fs/overlayfs/overlayfs.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/overlayfs/overlayfs.c b/fs/overlayfs/overlayfs.c
index 6b8a7b9..1148b8c 100644
--- a/fs/overlayfs/overlayfs.c
+++ b/fs/overlayfs/overlayfs.c
@@ -692,8 +692,11 @@ static int ovl_copy_up_xattr(struct dentry *old, struct dentry *new)
 		return 0;
 
 	list_size = vfs_listxattr(old, NULL, 0);
-	if (list_size <= 0)
+	if (list_size <= 0) {
+		if (list_size == -EOPNOTSUPP)
+			return 0;
 		return list_size;
+	}
 
 	buf = kzalloc(list_size, GFP_KERNEL);
 	if (!buf)
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ