From: Nathan Scott <nathans@sgi.com>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, "Theodore Ts'o" <tytso@thunk.org>
Subject: Re: [BUG] With size > XATTR_SIZE_MAX, getxattr(2) always returns E2BIG
Date: Mon, 9 Feb 2004 12:26:57 +1100 [thread overview]
Message-ID: <20040209012657.GA1466@frodo> (raw)
In-Reply-To: <1075812739.21199.11.camel@E136.suse.de>
On Tue, Feb 03, 2004 at 01:52:19PM +0100, Andreas Gruenbacher wrote:
> Hello,
>
> here is a fix for the getxattr and listxattr syscall. Explanation in the
> patch. Could you please apply? Thanks.
Our regression tests tripped a couple of problems with this;
here's a patch on top of yours (which is now 2.6.3-rc1).
cheers.
--
Nathan
--- /usr/tmp/TmpDir.13927-0/fs/xattr.c_1.2 2004-02-09 11:42:31.000000000 +1100
+++ fs/xattr.c 2004-02-09 11:37:39.747592560 +1100
@@ -139,7 +139,7 @@
if (error)
goto out;
error = d->d_inode->i_op->getxattr(d, kname, kvalue, size);
- if (error > 0) {
+ if (size && error > 0) {
if (copy_to_user(value, kvalue, error))
error = -EFAULT;
} else if (error == -ERANGE && size >= XATTR_SIZE_MAX) {
@@ -221,7 +221,7 @@
if (error)
goto out;
error = d->d_inode->i_op->listxattr(d, klist, size);
- if (error > 0) {
+ if (size && error > 0) {
if (copy_to_user(list, klist, error))
error = -EFAULT;
} else if (error == -ERANGE && size >= XATTR_LIST_MAX) {
next prev parent reply other threads:[~2004-02-09 1:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-03 12:52 Andreas Gruenbacher
2004-02-09 1:26 ` Nathan Scott [this message]
2004-02-09 2:42 ` Andreas Gruenbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040209012657.GA1466@frodo \
--to=nathans@sgi.com \
--cc=agruen@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@thunk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®