* [PATCH] fix wrong value returned from btrfs_listxattr when buffer is too small
@ 2008-12-12 22:36 Yehuda Sadeh Weinraub
2008-12-17 15:22 ` Chris Mason
2008-12-19 0:25 ` Sage Weil
0 siblings, 2 replies; 4+ messages in thread
From: Yehuda Sadeh Weinraub @ 2008-12-12 22:36 UTC (permalink / raw)
To: linux-btrfs
Fix bug, btrfs_listxattr doesn't return an error when the buffer size
is too small (ret was overridden).
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
---
fs/btrfs/xattr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index adb4b32..4146f07 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -226,7 +226,7 @@ ssize_t btrfs_listxattr(struct dentry *dentry,
char *buffer, size_t size)
if (!buffer || (name_len + 1) > size_left) {
ret = -ERANGE;
- break;
+ goto err;
}
name_ptr = (unsigned long)(di + 1);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fix wrong value returned from btrfs_listxattr when buffer is too small
2008-12-12 22:36 [PATCH] fix wrong value returned from btrfs_listxattr when buffer is too small Yehuda Sadeh Weinraub
@ 2008-12-17 15:22 ` Chris Mason
2008-12-19 0:25 ` Sage Weil
1 sibling, 0 replies; 4+ messages in thread
From: Chris Mason @ 2008-12-17 15:22 UTC (permalink / raw)
To: Yehuda Sadeh Weinraub; +Cc: linux-btrfs
On Fri, 2008-12-12 at 14:36 -0800, Yehuda Sadeh Weinraub wrote:
> Fix bug, btrfs_listxattr doesn't return an error when the buffer size
> is too small (ret was overridden).
>
Thank you, I've applied this one locally and will push it out.
-chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix wrong value returned from btrfs_listxattr when buffer is too small
2008-12-12 22:36 [PATCH] fix wrong value returned from btrfs_listxattr when buffer is too small Yehuda Sadeh Weinraub
2008-12-17 15:22 ` Chris Mason
@ 2008-12-19 0:25 ` Sage Weil
2008-12-19 1:42 ` Chris Mason
1 sibling, 1 reply; 4+ messages in thread
From: Sage Weil @ 2008-12-19 0:25 UTC (permalink / raw)
To: linux-btrfs; +Cc: Yehuda Sadeh Weinraub
BTW it looks like the commit log made it into git, but not the patch
itself... :)
sage
On Fri, 12 Dec 2008, Yehuda Sadeh Weinraub wrote:
> Fix bug, btrfs_listxattr doesn't return an error when the buffer size
> is too small (ret was overridden).
>
> Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
> ---
> fs/btrfs/xattr.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
> index adb4b32..4146f07 100644
> --- a/fs/btrfs/xattr.c
> +++ b/fs/btrfs/xattr.c
> @@ -226,7 +226,7 @@ ssize_t btrfs_listxattr(struct dentry *dentry,
> char *buffer, size_t size)
>
> if (!buffer || (name_len + 1) > size_left) {
> ret = -ERANGE;
> - break;
> + goto err;
> }
>
> name_ptr = (unsigned long)(di + 1);
> --
> 1.5.6.5
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix wrong value returned from btrfs_listxattr when buffer is too small
2008-12-19 0:25 ` Sage Weil
@ 2008-12-19 1:42 ` Chris Mason
0 siblings, 0 replies; 4+ messages in thread
From: Chris Mason @ 2008-12-19 1:42 UTC (permalink / raw)
To: Sage Weil; +Cc: linux-btrfs, Yehuda Sadeh Weinraub
On Thu, 2008-12-18 at 16:25 -0800, Sage Weil wrote:
> BTW it looks like the commit log made it into git, but not the patch
> itself... :)
>
Ugh. The patch was malformed and I thought I fixed it. I think guilt
is making it easy for me to mess this up ;) Thanks, will fix.
-chris
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-19 1:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-12 22:36 [PATCH] fix wrong value returned from btrfs_listxattr when buffer is too small Yehuda Sadeh Weinraub
2008-12-17 15:22 ` Chris Mason
2008-12-19 0:25 ` Sage Weil
2008-12-19 1:42 ` Chris Mason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox