We cast 0 to a u8 but then because of type promotion, it's immediately
cast to int back to int before we do a bitwise negate. The cast doesn't
matter in this case, the code works as intended. It causes a static
checker warning though so let's remove it.
Signed-off-by: Dan Carpent
= cur_devices->seed;
dereferenced here.
If we don't hit the break statement, then at the end of the loop we'd
oops.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo
init_ipath() can return an ERR_PTR(-ENOMEM).
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index ed11d38..b72ee47 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -256,6 +256,11 @@ static int scrub_print_warning_inode(u64 inum, u64 offset,
u64 root, void
_btrfs_start_workers() enables them. Maybe that function should use
spin_lock_irqsave() instead of spin_lock_irq().
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
The intent here was to do a logical && instead of a bitwise &. The
original condition tests whether they have the some of same bits set.
I have fixed that and rewritten it to be more clear.
Signed-off-by: Dan Carpenter
---
Warning: This is a static analysis bug and I'm not v
These should be gfp_t or Sparse complains:
fs/btrfs/ulist.c:100:55: warning:
incorrect type in argument 2 (different base types)
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/ulist.c b/fs/btrfs/ulist.c
index 12f5147..5d1b047 100644
--- a/fs/btrfs/ulist.c
+++ b/fs/btrfs/ulist.c
LOCK_GROUP_TYPE_MASK and
BTRFS_BALANCE_TYPE_MASK which are the same except that the bitfields
have been renamed. Can't we just reuse the first definition?
But really, if this isn't a bug, then I don't care. The original is
fine, or whatever you choose.
regards,
dan carpenter
signature.asc
Description: Digital signature
ot; can be either a negative error code, zero, or one here.
921
I looked at the code, but couldn't tell if it was intentional or not.
It really is pretty unusual to do that, so maybe there should be a
comment or something.
regards,
dan carpenter
--
To unsubscribe from this list: send the li
Gcc warns that "ret" can be used uninitialized. It can't actually be
used uninitialized because btrfs_num_copies() always returns 1 or more.
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 064b29b..c053e90 100644
--- a
On Wed, Feb 22, 2012 at 08:29:26AM -0800, David Brown wrote:
> On Wed, Feb 22, 2012 at 10:30:55AM +0300, Dan Carpenter wrote:
> >Gcc warns that "ret" can be used uninitialized. It can't actually be
> >used uninitialized because btrfs_num_copies() always returns 1
Gcc warns that "ret" can be used uninitialized. It can't actually be
used uninitialized because btrfs_num_copies() always returns 1 or more.
Signed-off-by: Dan Carpenter
---
v2: use the uninitialized_var() macro instead of initializing to 0.
diff --git a/fs/btrfs/check-integri
tex_unlock(&root->fs_info->tree_log_mutex);
1413 goto cleanup_transaction;
^
Should we do an mutex_unlock(&root->fs_info->reloc_mutex); before these
two gotos?
1414 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscr
On Mon, Apr 02, 2012 at 12:46:44PM +0200, David Sterba wrote:
>
> Thanks for cathing it. Are you going to send a patch or are you fine
> with a Reported-by: ?
>
You're welcome. :) Reported-by is fine.
regards,
dan carpenter
--
To unsubscribe from this list: send the line &
The caller expects this function to return with the lock held and
releases it immediately on error.
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 2b35f8d..a0bb9dc 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2301,6
It confuses Smatch that we use two names for the same lock. Plus the
shorter name is nicer. This doesn't change how the code works, it's
just a cleanup.
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a0bb9dc..29c0445 100644
---
On Wed, Apr 18, 2012 at 01:29:46PM +0200, Jan Schmidt wrote:
> On 18.04.2012 08:59, Dan Carpenter wrote:
> I think the correct way to fix this is:
>
Yeah. I considered both ways, but I chose the one which makes the
tools happy. Which is the wrong choice, because taking a pointles
+logical >> PAGE_CACHE_SHIFT, 1);
+ if (ret == 1)
+ kref_get(&zone->refcnt);
}
+ spin_unlock(&fs_info->reada_lock);
return zone;
}
regards,
dan carpenter
--
To unsubscrib
On Mon, Apr 30, 2012 at 01:23:29PM +0200, Arne Jansen wrote:
> On 30.04.2012 13:11, Dan Carpenter wrote:
> > Hello Arne Jansen,
> >
> > The patch 8c9c2bf7a3c4: "btrfs: fix race in reada" from Feb 25, 2012,
> > leads to the following warning:
>
On Mon, Apr 30, 2012 at 01:23:29PM +0200, Arne Jansen wrote:
> On 30.04.2012 13:11, Dan Carpenter wrote:
> > Hello Arne Jansen,
> >
> > The patch 8c9c2bf7a3c4: "btrfs: fix race in reada" from Feb 25, 2012,
> > leads to the following warning:
>
If we really have other clear rules, then it should be encoded into
get_maintainer.pl so that it's automatic.
My other question is why do the linux-arm-ker...@lists.infradead.org
people feel like they need to be CC'd about every driver??? I always
remove them from the CC list unless it'
ialized if the first character is not ':'.
1579
1580level = btrfs_compress_op[type]->set_level(level);
1581
1582 return level;
1583 }
regards,
dan carpenter
it cleaner and
to silence the static checkers.
Signed-off-by: Dan Carpenter
---
fs/btrfs/inode.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 9b0e3e2d589c..039a12f51cd7 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.
We should drop the lock on this error path. This is from static
analysis and I don't know if it's possible to hit this error path in
real life.
Signed-off-by: Dan Carpenter
---
fs/btrfs/dev-replace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/btrfs/dev-replace.c b/fs
7;t thought about that read locks could
nest.
regards,
dan carpenter
The btrfs_get_chunk_map() never returns NULL, it returns error pointers.
Fixes: 89b798ad1b42 ("btrfs: Use btrfs_get_io_geometry appropriately")
Signed-off-by: Dan Carpenter
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c
) takes a bit number
fs/btrfs/dev-replace.c:175 btrfs_init_dev_replace() warn: test_bit() takes a
bit number
fs/btrfs/dev-replace.c:310 btrfs_dev_name() warn: test_bit() takes a bit number
fs/btrfs/dev-replace.c:570 btrfs_dev_replace_finishing() warn: test_bit() takes
a bit number
regards,
dan carpenter
^^^
If btrfs_commit_transaction() fails too early then this is freed but
it's still in the ->pending_snapshots list leading to a use after free.
891
892 return ret;
893 }
regards,
dan carpenter
.config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
fs/btrfs/file.c:1980 btrfs_direct_write() error: uninitialized symbol 'dsync'.
Old smatch wa
btrfs_subpage_test_uptodate(fs_info, page, eb->start,
eb->len)) {
5808 set_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags);
5809 unlock_extent(io_tree, eb->start, eb->start + eb->len -
1);
5810 return ret;
5811 }
regards,
dan carpenter
Yeah. Once you know it's only for readahead then that makes perfect
sense. Thanks!
regards,
dan carpenter
ock(&fs_info->trans_lock);
^^^
504 }
505 spin_unlock(&fs_info->trans_lock);
Double unlock here.
506
507 path = btrfs_alloc_path();
508 if (!path) {
regards,
dan carpenter
e we
expected.
Fixes: 6f72c7e20dba: ("Btrfs: add qgroup inheritance")
Signed-off-by: Dan Carpenter
---
Presumably only root can create snapshots. Anyway, I have not tested
this fix. I believe it is correct, of course. But perhaps it's best
to check.
The calculation for t
^^
1884
1885 return device;
1886 }
See also:
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
osed to be | or perhaps check that both are set?
6389 btrfs_err(fs_info,
6390 "mixed chunk type in non-mixed mode: %llu",
type);
6391 return -EIO;
6392 }
6393 }
regards,
dan c
The error handling in "goto out;" expects that if "trans" is non-NULL
that means it's valid. Unfortunately it could also be an error pointer.
Fixes: c9a6fe84fe43 ("btrfs: qgroups: Move transaction management inside
btrfs_quota_enable/disable")
Signed-off-
d it
leads to a use after free inside the btrfs_end_transaction() macro.
Fixes: 340f1aa27f36 ("btrfs: qgroups: Move transaction management inside
btrfs_quota_enable/disable")
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 4353bb69bb86..d4917c0cddf5
hift); break;
It took me a while to spot these break statements.
> + default:
> + zone = 0;
> + break;
This break needs to be indented one more tab.
> }
>
> ASSERT(zone <= U32_MAX);
regards,
dan carpenter
cast to unsigned and the extra cast is
silly.
> +min_t(u32, len, sizeof(*item)));
regards,
dan carpenter
On Wed, Feb 20, 2019 at 08:58:43AM +0300, Dan Carpenter wrote:
> On Wed, Feb 20, 2019 at 03:08:40AM +, YueHaibing wrote:
> > btrfs_item_size_nr return value is u32, convert it to int may result
> > in truncation.Also read_extent_buffer expect a unsigned param, so
> > min_
; wouldn't want to pass negatives to read_extent_buffer(). Also there
> is an extra cast.
>
> This patch shouldn't affect runtime, it's just a clean up.
>
> Suggested-by: Dan Carpenter
It wasn't really suggested by me... But I do think it's the right
thing.
Reviewed-by: Dan Carpenter
regards,
dan carpenter
lock %llu owner %llu already locked by pid=%d, extent tree
corruption detected",
8559buf->start, btrfs_header_owner(buf),
current->pid);
8560 free_extent_buffer(buf);
regards,
dan carpenter
() and run_test().
regards,
dan carpenter
return 0;
1054
See also:
fs/btrfs/free-space-cache.c:1319 __btrfs_write_out_cache() warn: variable
dereferenced before check 'block_group' (see line 1295)
fs/btrfs/free-space-cache.c:1295 __btrfs_write_out_cache() error: we previously
assumed 'block_group' could be null (see line 1253)
regards,
dan carpenter
goto out;
2483 }
2484
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
memdup_user() returns error pointers, it doesn't return NULL.
Fixes: 01141b08dee5 ("btrfs: Add unprivileged ioctl which returns subvolume's
ROOT_REF")
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index ff5018587bd9..d8dd4504bdab 100644
--
This code causes a problem for flush_epd_write_bio() because | has
higher precedence than ?: so it basically turns into:
((bio)->bi_opf |= REQ_SYNC;
Which is wrong.
Fixes: ef295ecf090d ("block: better op and flags encoding")
Signed-off-by: Dan Carpenter
diff --git a/
0;
1684 path->locks[root_level] = 0; /* so release_path doesn't try to
unlock */
1685 walk_down:
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
e_ptr;
233 struct btrfs_key key;
234 int name_len;
235 int ret;
236 u64 ino;
237
238 if (!dir || !inode)
^
Old code checked for NULL.
239 return -EINVAL;
240
regards,
dan carpente
We accidentally deleted a new line in commit 0921910aa6fe ("btrfs: Make
btrfs_log_inode take btrfs_inode")
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index f1dc36a181db..010cf7685677 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
It's basically harmless if "ref_level" isn't initialized since it's only
used for an error message, but it causes a static checker warning.
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index e42aa27..39dbdcb 100644
--- a/fs/btrfs/scrub
goto out;
1476 leaf = path->nodes[0];
1477 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]);
1478 extent = btrfs_item_ptr(leaf, path->slots[0],
regards,
dan carpenter
--
To unsubscribe from this list: send the line
if (btrfs_header_level(next) !=
363 level - 1)
364 BUG();
365 btrfs_print_tree(root, next);
366 free_extent_buffer(next);
367 }
regards,
dan carpenter
--
To unsubscribe from this list: send th
btrfs_tree_lock(eb);
^^
Dereference.
1859 if (cow) {
1860 ret = btrfs_cow_block(trans, dest, eb,
parent,
1861slot, &eb);
regards,
dan car
extra bytes of memory! Such a waste!" But
we could use instead use___GFP_NOFAIL instead. Or BUG_ON(!foo)". I
have gotten distracted. What was the question again?
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a
The "sizeof(*arg->clone_sources) * arg->clone_sources_count" expression
can overflow. It causes several static checker warnings. It's all
under CAP_SYS_ADMIN so it's not that serious but lets silence the
warnings.
Signed-off-by: Dan Carpenter
diff --git a/fs/btrf
1);
sctx->clone_roots = kzalloc(alloc_size, GFP_KERNEL | __GFP_NOWARN);
Fixes: f5ecec3ce21f ("btrfs: send: silence an integer overflow warning")
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 030d592ed1fe..ad9508e67384 100644
--- a/fs/btrfs
btrfs_get_extent() never returns NULL pointers, so this code introduces
a static checker warning.
The btrfs_get_extent() is a bit complex, but trust me that it doesn't
return NULLs and also if it did we would trigger the BUG_ON(!em) before
the last return statement.
Signed-off-by: Dan Carp
"item" is never used.
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 1e4e4532f381..337aef86dae5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5881,7 +5881,6 @@ static int btrfs_real_readdir(struct file *file, struct
dir_co
if (!eb)
^^^
New check. Maybe we should be adding "root->leafsize" here? Just
the check earlier would cause a forever loop.
3815 continue;
3816 wait_on_extent_buffer_write
though, so I
have added some more calls to kfree().
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 0525e13..0db856c 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -1687,11 +1687,8 @@ int raid56_parity_write(struct btrfs_root *root, struct
On Mon, Jul 22, 2013 at 04:47:00PM +0800, Miao Xie wrote:
> On mon, 22 Jul 2013 09:55:15 +0300, Dan Carpenter wrote:
> > The alloc_rbio() frees "raid_map" and "bbio" on error, so there is a
> > potential double free bug in raid56_parity_write().
return 0;
701 }
702 re->scheduled = 1;
703 spin_unlock(&re->lock);
704
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message
We were putting the NUL terminator at BTRFS_PATH_NAME_MAX (4087) bytes
instead of BTRFS_SUBVOL_NAME_MAX (4039) so it corrupted memory.
Fixes: 22af1a869288 ('btrfs: introduce device delete by devid')
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
ind
ew Smatch thing
I am working on and I am investigating false positives.
179 ret = btrfs_add_log_tree(trans, root);
180 if (ret)
181 goto out;
182 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
s:
4665 kfree(bargs);
4666 out_unlock:
4667 mutex_unlock(&fs_info->balance_mutex);
4668 mutex_unlock(&fs_info->volume_mutex);
4669 if (need_unlock)
4670
atomic_set(&fs_info->mutually_exclusive_operation_running, 0);
4671
btrfs_end_transaction(trans, root);
4111 }
4112 }
4113
4114 trace_btrfs_space_reservation(root->fs_info,
4115"space_info:enospc",
4116 data_sinfo->flags, bytes,
1);
btrfs_alloc_dummy_root() return an error pointer on failure, it never
returns NULL.
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/tests/free-space-tests.c
b/fs/btrfs/tests/free-space-tests.c
index c8c3d70..8b72b00 100644
--- a/fs/btrfs/tests/free-space-tests.c
+++ b/fs/btrfs/tests/free
p;&
3075 !(bctl->meta.flags & BTRFS_BALANCE_ARGS_CONVERT)) {
Same.
3076 bctl->meta.flags |= BTRFS_BALANCE_ARGS_USAGE;
3077 bctl->meta.usage = 90;
3078 }
3079 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
This function is supposed to return blk_status_t error codes now but
there was a stray -ENOMEM left behind.
Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t")
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index e536e98fe351..2c
continue;
3422 }
3423
3424 set_range_writeback(tree, cur, cur + iosize - 1);
The patch adds a new unchecked dereference.
regards,
dan carpenter
--
To unsubscribe from this list:
return;
183
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
> at the end of this function.
> >
> > This issue was detected by using the Coccinelle software.
>
> btrfs_abort_transaction dumps __FILE__:__LINE__ in the log so this patch
> makes the code more difficult to debug.
>
I was just reviewing this and I missed that issue. The
like bashing my face into the
keyboard for all the good it does. On the other hand, some people
accept these oddly placed labels... No one else writes code like this
so far as I know.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
2505 error:
2506 blkdev_put(bdev, FMODE_EXCL);
2507 if (seeding_dev && !unlocked) {
2508 mutex_unlock(&uuid_mutex);
2509 up_write(&sb->s_umount);
2510 }
2511 return ret;
2512 }
regards,
dan carpenter
read_tree_block() returns error pointers, and never NULL and so I have
updated the error handling.
Fixes: 74739121b4c7 ("Btrfs: add a extent ref verify tool")
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/ref-verify.c b/fs/btrfs/ref-verify.c
index f65d78cf3c7e..34878699d363 10064
There is a cut and paste error so instead of freeing "head_ref", we free
"ref" twice.
Fixes: 3368d001ba5d ('btrfs: qgroup: Record possible quota-related extent for
qgroup.')
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
s(eb) : 0;
^
Checked here again indirectly.
147 generation = btrfs_header_generation(eb);
^^^
Dereferenced inside function without checking.
148 /*
149
I missed the comment.
> This code changes significantly with the patch
>
> btrfs: extend readahead interface
>
> Where it is written in a more obvious way.
Cool.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body o
t;start,
val, found,
306 btrfs_header_level(buf));
307 if (result != (char *)&inline_result)
308 kfree(result);
309 return 1;
regards,
dan carpenter
--
To
Or if we exit, then this is a double unlock.
There is some complicated locking going on in that function so I don't
pretend to understand it. Sorry, if I've misread something.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
"root->fs_info" and "fs_info" are the same, but "fs_info" is prefered
because it is shorter and that's what is used in the rest of the
function.
Signed-off-by: Dan Carpenter
---
Also, Smatch doesn't understand that they are the same so it complain
list_del_init(&root->root_list);
1283 spin_unlock(&root->fs_info->trans_lock);
1284 kfree(node);
^^^
And here as well I guess.
1285 }
1286 return 0;
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
We free "node" and then dereference it in the panic message on the next
line. I considered moving the kfree() after the panic given that panic
can return under certain configurations, but in the end I decided it
doesn't matter if we leak a bit after a panic.
Signed-off-by: Dan C
On Fri, Jun 22, 2012 at 09:09:04AM -0400, Josef Bacik wrote:
> On 06/22/2012 03:14 AM, Dan Carpenter wrote:
> >We free "node" and then dereference it in the panic message on the next
> >line. I considered moving the kfree() after the panic given that panic
&g
We dereferenced "node" in the error message after freeing it. Also
btrfs_panic() can return so we should return an error code instead of
continuing.
Signed-off-by: Dan Carpenter
---
v2: in the first version I just deleted the kfree().
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/re
On Mon, Jun 25, 2012 at 09:41:12AM -0400, Josef Bacik wrote:
> On Mon, Jun 25, 2012 at 05:15:23AM -0600, Dan Carpenter wrote:
> > We dereferenced "node" in the error message after freeing it. Also
> > btrfs_panic() can return so we should return an error code
not on my end. It made it to marc.info without
getting corrupted. Marc.info strips out the From: and Subject:
headers so you'd have to add them in manually.
1) Save this file:
http://marc.info/?l=kernel-janitors&m=134062314509635&q=raw
2) Edit the file and add these two lines ad
"trans->transid" is cpu endian but we want to store the data as little
endian. "item->ctime.nsec" is only 32 bits, not 64.
Signed-off-by: Dan Carpenter
---
Applies to linux-next.
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 43f0012..a1fbca0 100644
--- a
We should release this mutex before returning the error code.
Signed-off-by: Dan Carpenter
---
Applies to linux-next.
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 4e1b153..45c69c4 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -4571,8 +4571,10 @@ int
add_qgroup_rb() never returns NULL, only error pointers.
Signed-off-by: Dan Carpenter
---
Applies to linux-next.
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index bc424ae..b650155 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1364,8 +1364,10 @@ int btrfs_qgroup_inherit
These are returning zero when it should be returning a negative error
code.
Signed-off-by: Dan Carpenter
---
Applies to linux-next.
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index b650155..38b42e7 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1371,8 +1371,10 @@ int
On Tue, Sep 11, 2012 at 04:35:26AM -0400, Marios Titas wrote:
> On Tue, Sep 11, 2012 at 2:19 AM, Arne Jansen wrote:
> >
> > instead of applying my patch, could you please just revert
> >
> > commit 5986802c2fcc754040bb7ed95f30bb16c4a843b7
> > Author: Dan Carpenter
if (node->ref_mod > 0)
^
Use after free.
278 ref_tree->unique_refs += origin_count > 0 ? 0 : 1;
279 else if (node->ref_mod <= 0)
280 ref_tree->unique_refs += origin_count > 0 ? -1 : 0;
281
282 ret
struct btrfs_key key;
234 int name_len;
235 int ret;
236 u64 ino;
237
238 if (!dir || !inode)
^
Old code assumed it can be NULL.
239 return -EINVAL;
240
regards,
dan carpenter
--
trace_btrfs_space_reservation(root->fs_info,
3709"space_info:enospc",
3710data_sinfo->flags, bytes,
1);
^
Patch introdu
This is a memory corruption bug, could someone take a look at it?
regards,
dan carpetner
On Fri, Jun 15, 2012 at 10:49:22PM +0300, Dan Carpenter wrote:
> Hello Josef Bacik,
>
> The patch 607d432da054: "Btrfs: add support for multiple csum
> algorithms" from Dec 2, 2008,
Hi Josef,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git
master
head: 39a6066ac26f336b444c666a4b7339078ebf19b1
commit: 2d6d440d12fe503bc909f9f9e1fe8771d84f [105/117] Btrfs: wait on
ordered extents at the last possib
[ get_avail_device() sometimes returns an ERR_PTR ]
Hi Liu,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git
master
head: 3d294381647ab114f525a0ccf3d28f8172ce6a5f
commit: 3d294381647ab114f525a0ccf3d28f8172ce6a5f [21/21] B
The closing parenthesis is in the wrong place. We want to check
"sizeof(*arg->clone_sources) * arg->clone_sources_count" instead of
"sizeof(*arg->clone_sources * arg->clone_sources_count)".
Signed-off-by: Dan Carpenter
---
This is also vulnerable to integer overf
;sf->error" here? I don't know the code well enough to
say the answer.
1099 goto
one_stack_frame_backwards;
1100 }
1101
1102 next_stack->i =
1 - 100 of 152 matches
Mail list logo