search for: bug_on

Displaying 20 results from an estimated 2407 matches for "bug_on".

2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
Document those places in the btrfs code which are BUGing on non-fatal error conditions that should be handled by proper error paths. This makes it easier to distinguish between what needs fixing versus which BUG_ON''s we might want to keep (to trap code bugs, unexpected inconsistencies, etc). Do this with a trivial macro, ''btrfs_fixable_bug_on'' which just defines to BUG_ON(). The rest of this patch is basically a manual search and replace for all the places where it was obvious to m...
2008 Dec 04
6
[Doc] writeup for error handling usage in XEN
Hi, all Those days, we spent some efforts to check severe error handling (panic, BUG_ON, BUG, ASSERT) in XEN. We have several round internal discussions as well as several mail threads with Keir. Below is the discussion writeup. If agreed, after review, we want to place it in XEN document folder or XEN wiki since we think it might be helpful to developers. Thanks a lot for your hel...
2011 Aug 15
9
[patch v2 0/9] btrfs: More error handling patches
...ock_extent errors to callers - Push up clear_extent_bit errors to callers - Push up unlock_extent errors to callers - Make pin_down_extent return void - Push up btrfs_pin_extent errors to callers - Push up non-looped btrfs_transaction_start errors to callers Changes since version 1: - Changed BUG_ON(ret) to BUG_ON(ret < 0) in set_extent_bit push up patch - Added missing chunk to set_extent_bit push up patch - Added handling for btrfs_drop_snapshot return values to btrfs_transaction_start patch <Tsutomu Itoh> -Jeff -- Jeff Mahoney SUSE Labs -- To unsubscribe from this list: send...
2016 Mar 11
0
[PATCH v1 06/19] zsmalloc: clean up many BUG_ON
There are many BUG_ON in zsmalloc.c which is not recommened so change them as alternatives. Normal rule is as follows: 1. avoid BUG_ON if possible. Instead, use VM_BUG_ON or VM_BUG_ON_PAGE 2. use VM_BUG_ON_PAGE if we need to see struct page's fields 3. use those assertion in primitive functions so higher functions...
2013 Apr 25
0
[PATCH] Btrfs: remove almost all of the BUG()'s from tree-log.c
There were a whole bunch and I was doing it for other things. I haven''t tested these error paths but at the very least this is better than panicing. I''ve only left 2 BUG_ON()''s since they are logic errors and I want to replace them with a ASSERT framework that we can compile out for production users. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> --- fs/btrfs/tree-log.c | 151 +++++++++++++++++++++++++++++++++------------------ 1 files cha...
2011 Mar 23
0
[PATCH] Btrfs: cleanup some BUG_ON()
This patch changes some BUG_ON() to the error return. (but, most callers still use BUG_ON()) Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- fs/btrfs/ctree.c | 3 ++- fs/btrfs/disk-io.c | 5 ++++- fs/btrfs/extent-tree.c | 25 ++++++++++++++++++------- fs/btrfs/file-item.c | 3 ++- fs/btrfs/...
2011 Jun 03
1
[patch] xen: off by one errors in multicalls.c
...lly. diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c index 8bff7e7..1b2b73f 100644 --- a/arch/x86/xen/multicalls.c +++ b/arch/x86/xen/multicalls.c @@ -189,10 +189,10 @@ struct multicall_space __xen_mc_entry(size_t args) unsigned argidx = roundup(b->argidx, sizeof(u64)); BUG_ON(preemptible()); - BUG_ON(b->argidx > MC_ARGS); + BUG_ON(b->argidx >= MC_ARGS); if (b->mcidx == MC_BATCH || - (argidx + args) > MC_ARGS) { + (argidx + args) >= MC_ARGS) { mc_stats_flush(b->mcidx == MC_BATCH ? FL_SLOTS : FL_ARGS); xen_mc_flush(); argidx =...
2011 Jun 03
1
[patch] xen: off by one errors in multicalls.c
...lly. diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c index 8bff7e7..1b2b73f 100644 --- a/arch/x86/xen/multicalls.c +++ b/arch/x86/xen/multicalls.c @@ -189,10 +189,10 @@ struct multicall_space __xen_mc_entry(size_t args) unsigned argidx = roundup(b->argidx, sizeof(u64)); BUG_ON(preemptible()); - BUG_ON(b->argidx > MC_ARGS); + BUG_ON(b->argidx >= MC_ARGS); if (b->mcidx == MC_BATCH || - (argidx + args) > MC_ARGS) { + (argidx + args) >= MC_ARGS) { mc_stats_flush(b->mcidx == MC_BATCH ? FL_SLOTS : FL_ARGS); xen_mc_flush(); argidx =...
2011 Jun 03
1
[patch] xen: off by one errors in multicalls.c
...lly. diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c index 8bff7e7..1b2b73f 100644 --- a/arch/x86/xen/multicalls.c +++ b/arch/x86/xen/multicalls.c @@ -189,10 +189,10 @@ struct multicall_space __xen_mc_entry(size_t args) unsigned argidx = roundup(b->argidx, sizeof(u64)); BUG_ON(preemptible()); - BUG_ON(b->argidx > MC_ARGS); + BUG_ON(b->argidx >= MC_ARGS); if (b->mcidx == MC_BATCH || - (argidx + args) > MC_ARGS) { + (argidx + args) >= MC_ARGS) { mc_stats_flush(b->mcidx == MC_BATCH ? FL_SLOTS : FL_ARGS); xen_mc_flush(); argidx =...
2013 May 27
2
BUG_ON in virtio-ring.c
Dave Airlie <airlied at gmail.com> writes: > Hi Rusty, > > current virtio-ring.c has a BUG_ON in virtqueue_add that checks > total_sg > vg->vring.num, however I'm not sure it really is 100% > correct. > > If I have an indirect ring and I'm adding sgs to it and the host is > delayed (say I've got a thread consuming things from the vring and its > off doing...
2013 May 27
2
BUG_ON in virtio-ring.c
Dave Airlie <airlied at gmail.com> writes: > Hi Rusty, > > current virtio-ring.c has a BUG_ON in virtqueue_add that checks > total_sg > vg->vring.num, however I'm not sure it really is 100% > correct. > > If I have an indirect ring and I'm adding sgs to it and the host is > delayed (say I've got a thread consuming things from the vring and its > off doing...
2007 Jun 08
0
[git patches] ocfs2 fixes
...lid assertion during write on 64k pages Tiger Yang: ocfs2: Fix masklog breakage diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 0023b31..a480b09 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -798,6 +798,11 @@ int ocfs2_map_and_write_splice_data(stru } to = from + bytes; + BUG_ON(from > PAGE_CACHE_SIZE); + BUG_ON(to > PAGE_CACHE_SIZE); + BUG_ON(from < cluster_start); + BUG_ON(to > cluster_end); + if (wc->w_this_page_new) ret = ocfs2_map_page_blocks(wc->w_this_page, p_blkno, inode, cluster_start, cluster_end, 1); @@ -809,11 +814,6 @@ int ocfs...
2011 Feb 12
3
[PATCH] fix uncheck memory allocations
To make Btrfs code more robust, several return value checks where memory allocation can fail are introduced. I use BUG_ON where I don''t know how to handle the error properly, which increases the number of using the notorious BUG_ON, though. Signed-off-by: Yoshinori Sano <yoshinori.sano@gmail.com> --- fs/btrfs/compression.c | 6 ++++++ fs/btrfs/extent-tree.c | 2 ++ fs/btrfs/file.c | 8...
2012 Sep 06
1
[PATCH 2/3] btrfs: remove unnecessary -ENOMEM BUG_ON check in extent-tree.c/btrfs_alloc_logged_file_extent
The memory allocation failure is BUG_ON in add_excluded_extent (following the code path). No need to BUG_ON -ENOMEM inside btrfs_alloc_logged_file_extent. Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> --- fs/btrfs/extent-tree.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/extent-tree.c...
2014 Oct 07
2
BUG_ON in virtio-ring.c
Hi, I'm hitting this bug with both ext4 and btrfs. Here's an example of the backtrace: https://gist.github.com/vzctl/e888a821333979120932 I tried raising this BUG only for direct ring and it solved the problem: - BUG_ON(total_sg > vq->vring.num); + BUG_ON(total_sg > vq->vring.num && !vq->indirect); Shall I submit the patch or is a more elaborate fix required? -- Alexey On Mon, May 27, 2013 at 7:38 AM, Rusty Russell <rusty at rustcorp.com.au> wrote: > Dave Airlie <airl...
2014 Oct 07
2
BUG_ON in virtio-ring.c
Hi, I'm hitting this bug with both ext4 and btrfs. Here's an example of the backtrace: https://gist.github.com/vzctl/e888a821333979120932 I tried raising this BUG only for direct ring and it solved the problem: - BUG_ON(total_sg > vq->vring.num); + BUG_ON(total_sg > vq->vring.num && !vq->indirect); Shall I submit the patch or is a more elaborate fix required? -- Alexey On Mon, May 27, 2013 at 7:38 AM, Rusty Russell <rusty at rustcorp.com.au> wrote: > Dave Airlie <airl...
2013 May 14
1
[PATCH] Btrfs-progs: fix missing recow roots when making btrfs filesystem
...@@ -151,37 +151,55 @@ static int recow_roots(struct btrfs_trans_handle *trans, int ret; struct extent_buffer *tmp; struct btrfs_fs_info *info = root->fs_info; + u64 generation; - ret = __btrfs_cow_block(trans, info->fs_root, info->fs_root->node, - NULL, 0, &tmp, 0, 0); - BUG_ON(ret); - free_extent_buffer(tmp); + generation = btrfs_root_generation(&info->fs_root->root_item); + if (generation != trans->transid) { + ret = __btrfs_cow_block(trans, info->fs_root, + info->fs_root->node, NULL, 0, &tmp, 0, 0); + BUG_ON(ret); + free_extent_buffer(tm...
2014 Jul 28
2
[PATCH] x86, paravirt: BUG_ON on {rd,wr}msr exceptions
...{rd,wr}msr instructions. This makes serious issues (either on the guest kernel, or on the host) be silently ignored, and is different from the native MSR code (which does not ignore the exceptions). As paravirt.h already includes linux/bug.h, I don't see what was the original issue preventing BUG_ON from being used. Change rdmsr(), wrmsr(), and rdmsrl() to BUG_ON() on errors. Signed-off-by: Eduardo Habkost <ehabkost at redhat.com> --- * Build-tested using allyesconfig, with no build errors. * Tested by being able to detect the following host bug: https://bugzilla.redhat.com/show_bug...
2014 Jul 28
2
[PATCH] x86, paravirt: BUG_ON on {rd,wr}msr exceptions
...{rd,wr}msr instructions. This makes serious issues (either on the guest kernel, or on the host) be silently ignored, and is different from the native MSR code (which does not ignore the exceptions). As paravirt.h already includes linux/bug.h, I don't see what was the original issue preventing BUG_ON from being used. Change rdmsr(), wrmsr(), and rdmsrl() to BUG_ON() on errors. Signed-off-by: Eduardo Habkost <ehabkost at redhat.com> --- * Build-tested using allyesconfig, with no build errors. * Tested by being able to detect the following host bug: https://bugzilla.redhat.com/show_bug...
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them