Hi,
Currrently we leak memory in btrfs_get_acl::btrfs_get_acl() if
posix_acl_from_xattr() fails. With this patch we do not.
Signed-off-by: Jesper Juhl j...@chaosbits.net
---
acl.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index
On Sat, 25 Dec 2010, Mariusz Kozlowski wrote:
On Fri, Dec 24, 2010 at 11:45:21PM +0100, Jesper Juhl wrote:
Hi,
Currrently we leak memory in btrfs_get_acl::btrfs_get_acl() if
posix_acl_from_xattr() fails. With this patch we do not.
I sent similar patch some time ago but no reply from
btrfs_free_path() deal gracefully with NULL pointers. If you
disagree, feel free to come up with an alternative patch.
Signed-off-by: Jesper Juhl j...@chaosbits.net
---
ctree.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 9ac1715..99599f1 100644
It seems to me that we leak the memory allocated to 'value' in
btrfs_get_acl() if the call to posix_acl_from_xattr() fails.
Here's a patch that attempts to correct that problem.
Signed-off-by: Jesper Juhl j...@chaosbits.net
---
acl.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion
On Fri, 7 Jan 2011, Aneesh Kumar K. V wrote:
On Thu, 6 Jan 2011 22:45:21 +0100 (CET), Jesper Juhl j...@chaosbits.net
wrote:
It seems to me that we leak the memory allocated to 'value' in
btrfs_get_acl() if the call to posix_acl_from_xattr() fails.
Here's a patch that attempts
When memory is low and the allocation for 'dip-csums' fail in
fs/btrfs/inode.c:btrfs_submit_direct() we make the situation worse by
leaking the memory allocated to 'dip'.
This patch removes the leak by kfree()'ing 'dip' before jumping to the
'free_ordered' label.
Signed-off-by: Jesper Juhl j
On Sun, 13 Mar 2011, Jesper Juhl wrote:
When memory is low and the allocation for 'dip-csums' fail in
fs/btrfs/inode.c:btrfs_submit_direct() we make the situation worse by
leaking the memory allocated to 'dip'.
This patch removes the leak by kfree()'ing 'dip' before jumping
It was pointed out by 'make versioncheck' that some includes of
linux/version.h were not needed in fs/ (fs/btrfs/ctree.h and
fs/omfs/file.c).
This patch removes them.
Signed-off-by: Jesper Juhl j...@chaosbits.net
---
fs/btrfs/ctree.h |1 -
fs/omfs/file.c |1 -
2 files changed, 0
-by: Jesper Juhl j...@chaosbits.net
---
fs/btrfs/scrub.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Compile tested only since I don't have any btrfs filesystems to test on.
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index a8d03d5..b53433e 100644
--- a/fs/btrfs/scrub.c
+++ b/fs
Signed-off-by: Jesper Juhl j...@chaosbits.net
---
fs/btrfs/disk-io.c |2 +-
fs/btrfs/free-space-cache.c |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index f44b392..2a8038a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs
dereferencing a NULL pointer when the allocations fail.
Enjoy ;-)
PS.
Please CC me on replies.
--
Jesper Juhl j...@chaosbits.net http://www.chaosbits.net/
Plain text mails only, please http://www.expita.com/nomime.html
Don't top-post http://www.catb.org/~esr/jargon/html/T
Once should be enough.
Signed-off-by: Jesper Juhl j...@chaosbits.net
---
fs/btrfs/check-integrity.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index b669a7d..064b29b 100644
--- a/fs/btrfs/check-integrity.c
One is enough.
Signed-off-by: Jesper Juhl j...@chaosbits.net
---
fs/btrfs/disk-io.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 534266f..f87590b 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2744,7 +2744,7
);
free_ipath(ipath);
...
If we ever take the true branch of that 'if' statement we'll end up
passing a NULL pointer to free_ipath() which will subsequently
dereference it and we'll go Boom :-(
This patch will avoid that.
Signed-off-by: Jesper Juhl j...@chaosbits.net
---
fs/btrfs/backref.c |2 ++
1
__btrfs_std_error() neglects to call va_end() when doing early return
after testing if (errno == -EROFS (sb-s_flags MS_RDONLY)) and
btrfs_printk() doesn't call va_end() at all.
This patch makes sure that va_end() is always properly called.
Signed-off-by: Jesper Juhl j...@chaosbits.net
---
fs
15 matches
Mail list logo